furifont 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/B4Fx_Djw.js +1 -0
  5. package/dist/client/_nuxt/B7HtXrdR.js +1 -0
  6. package/dist/client/_nuxt/BJuAqPpj.js +75 -0
  7. package/dist/client/_nuxt/BT-EKmMU.js +1 -0
  8. package/dist/client/_nuxt/{CQTZHv-y.js → BjcMHMZP.js} +1 -1
  9. package/dist/client/_nuxt/Bkx7_K1f.js +3 -0
  10. package/dist/client/_nuxt/Bzck4lmu.js +1 -0
  11. package/dist/client/_nuxt/Cax8MU2E.js +1 -0
  12. package/dist/client/_nuxt/Cj8LKW1j.js +2 -0
  13. package/dist/client/_nuxt/CkUAspOr.js +3 -0
  14. package/dist/client/_nuxt/Cl84O_XS.js +1 -0
  15. package/dist/client/_nuxt/CmFwbX1G.js +1 -0
  16. package/dist/client/_nuxt/D4ezFGbh.js +2 -0
  17. package/dist/client/_nuxt/DAr951Yq.js +1 -0
  18. package/dist/client/_nuxt/DFtcLD73.js +3 -0
  19. package/dist/client/_nuxt/DHMCzW9E.js +3 -0
  20. package/dist/client/_nuxt/D_G0KgX8.js +1 -0
  21. package/dist/client/_nuxt/X45Acd-Y.js +1 -0
  22. package/dist/client/_nuxt/builds/latest.json +1 -1
  23. package/dist/client/_nuxt/builds/meta/82c26edb-3432-469a-acfa-8475fa64227b.json +1 -0
  24. package/dist/client/_nuxt/entry.D1RJUMvH.css +1 -0
  25. package/dist/client/_nuxt/error-404.CaT3AK-0.css +1 -0
  26. package/dist/client/_nuxt/error-500.WL1uhYQu.css +1 -0
  27. package/dist/client/_nuxt/lFAKI2D3.js +1 -0
  28. package/dist/client/_nuxt/{Bc3GUY-S.js → y75lAtyQ.js} +2 -2
  29. package/dist/client/customize/index.html +1 -1
  30. package/dist/client/furifont.user.js +2 -2
  31. package/dist/client/index.html +1 -1
  32. package/dist/client/reference/index.html +1 -1
  33. package/dist/client/report/index.html +1 -0
  34. package/dist/client/version.json +1 -1
  35. package/dist/{config-BgEXAgR6.mjs → config-NmS4azuQ.mjs} +1 -1
  36. package/dist/devframe.mjs +2 -2
  37. package/dist/index.d.mts +7 -1
  38. package/dist/index.mjs +2 -2
  39. package/dist/{studio-DLNpk_rE.mjs → studio-CJIk4xnE.mjs} +1 -1
  40. package/package.json +5 -5
  41. package/dist/client/_nuxt/AmQakyTh.js +0 -1
  42. package/dist/client/_nuxt/BDNMzG2s.js +0 -1
  43. package/dist/client/_nuxt/Bs3Pv9Qv.js +0 -1
  44. package/dist/client/_nuxt/C4NVi0HP.js +0 -75
  45. package/dist/client/_nuxt/CC4_XjFP.js +0 -3
  46. package/dist/client/_nuxt/CEWHii-_.js +0 -3
  47. package/dist/client/_nuxt/CEo6aVYN.js +0 -1
  48. package/dist/client/_nuxt/CRzLMJPS.js +0 -1
  49. package/dist/client/_nuxt/Cg7TlFyt.js +0 -1
  50. package/dist/client/_nuxt/DA1XwGcq.js +0 -1
  51. package/dist/client/_nuxt/DGhFAXuQ.js +0 -1
  52. package/dist/client/_nuxt/DLl_pn_F.js +0 -58
  53. package/dist/client/_nuxt/DSYkQlQa.js +0 -1
  54. package/dist/client/_nuxt/DT7XmrQw.js +0 -132
  55. package/dist/client/_nuxt/DTC_KzWZ.js +0 -79
  56. package/dist/client/_nuxt/DhRy_lmV.js +0 -1
  57. package/dist/client/_nuxt/DmOlRIb5.js +0 -2
  58. package/dist/client/_nuxt/DmlUWPPW.js +0 -3
  59. package/dist/client/_nuxt/Dz56DRZ7.js +0 -59
  60. package/dist/client/_nuxt/HB7Qu17x.js +0 -1
  61. package/dist/client/_nuxt/JRbXhaR6.js +0 -1
  62. package/dist/client/_nuxt/builds/meta/1bd12827-b513-45af-9638-872afc8faff4.json +0 -1
  63. package/dist/client/_nuxt/entry.CsCxOCYm.css +0 -1
  64. package/dist/client/_nuxt/error-404.DqUWOYf4.css +0 -1
  65. package/dist/client/_nuxt/error-500.BYTKxx4O.css +0 -1
  66. package/dist/client/_nuxt/g9q6jbAq.js +0 -1
  67. package/dist/client/_nuxt/jjE7wdAL.js +0 -1
  68. package/dist/client/_nuxt/nNFr3PcB.js +0 -2
  69. package/dist/client/_nuxt/nQF5Cd64.js +0 -3
  70. package/dist/client/docs/index.html +0 -1
@@ -1,58 +0,0 @@
1
- var e=`# Install the font
2
-
3
- Install Furifont on your computer to use it in any app that lets you choose a font: word processors, design tools, slides, notes, and the browser.
4
-
5
- ## Choose a file
6
-
7
- Get the fonts from the [Download](/#downloads) section or from the [latest release](https://github.com/antfu/furifont/releases/latest). [Furifont.zip](https://github.com/antfu/furifont/releases/latest/download/Furifont.zip) has all of them.
8
-
9
- There are four families: Sans and Serif, each with hiragana or romaji ruby. Each family comes in two kinds of file:
10
-
11
- | File | Family name in apps | Weights |
12
- | --- | --- | --- |
13
- | \`FurifontSansVF.ttf\` | Furifont Sans VF | Every weight, from ExtraLight to Heavy |
14
- | \`FurifontSans-Regular.otf\` | Furifont Sans | Regular only |
15
-
16
- Pick the variable font (\`VF.ttf\`) if your apps support variable fonts. Its ruby follows the weight of the text. Use the \`.otf\` file for an app that does not show the variable font, or shows only one weight of it.
17
-
18
- The \`.woff2\` files are for websites. Computers do not install them. See [Use on your website](/docs/website).
19
-
20
- ## macOS
21
-
22
- 1. Double-click the \`.ttf\` or \`.otf\` file. Font Book opens.
23
- 2. Click **Install**.
24
-
25
- You can also drag the files into the \`Library/Fonts\` folder in your home folder. To install the font for all users, use \`/Library/Fonts\` instead.
26
-
27
- ## Windows
28
-
29
- 1. Right-click the \`.ttf\` or \`.otf\` file.
30
- 2. Click **Install** for your user only, or **Install for all users**.
31
-
32
- You can also drag the files onto **Settings > Personalization > Fonts**. On Windows 11, first click **Show more options** to see **Install** in the menu.
33
-
34
- ## Linux
35
-
36
- Copy the files to your fonts folder, then refresh the font cache:
37
-
38
- \`\`\`sh
39
- mkdir -p ~/.local/share/fonts
40
- cp FurifontSansVF.ttf ~/.local/share/fonts/
41
- fc-cache -f
42
- \`\`\`
43
-
44
- Check that the system finds it:
45
-
46
- \`\`\`sh
47
- fc-list | grep Furifont
48
- \`\`\`
49
-
50
- To install for all users, copy the files to \`/usr/local/share/fonts\` instead (with \`sudo\`).
51
-
52
- ## After you install
53
-
54
- - Restart the apps that were open, so they see the new font.
55
- - Give lines enough height. The ruby sits above the kanji, so text needs a line spacing of about 1.6 or more, or the ruby is cut off.
56
- - To hide the ruby without changing the font, turn on **Stylistic Set 1**. In Word for Windows, it is in **Font > Advanced > Stylistic sets**. On macOS, apps that use the system font panel show it under **Typography**.
57
- - To show another reading of a word, see [Choose a reading](/docs/readings).
58
- `;export{e as default};
@@ -1 +0,0 @@
1
- import{D as e,Kt as t,M as n,T as r,Z as i,_ as a,et as o,j as s,lt as c,w as l,wt as u}from"./DmlUWPPW.js";import{t as d}from"./Cg7TlFyt.js";import{t as f}from"./BDNMzG2s.js";import{n as p,o as m}from"#entry";var h={},g={class:`grid lg:grid-cols-[240px_1fr]`},_=[`aria-label`],v={class:`flex flex-col gap-1 p-6 lg:sticky lg:top-14`},y={class:`label mb-2`};function b(f,h){let b=d,x=p;return i(),e(`div`,g,[l(`nav`,{class:`border-b border-base lg:border-b-0 lg:border-r`,"aria-label":f.$t(`nav.docs`)},[l(`div`,v,[l(`span`,y,t(f.$t(`nav.docs`)),1),(i(!0),e(a,null,o(`DOCS`in f?f.DOCS:u(m),e=>(i(),r(b,{key:e,to:`/docs/${e}`,class:`focus-ring py-1 text-sm color-muted transition-colors hover:color-base`,"active-class":`!color-base font-medium`},{default:c(()=>[s(t(f.$t(`docs.${e}`)),1)]),_:2},1032,[`to`]))),128))])],8,_),n(x)])}var x=f(h,[[`render`,b]]);export{x as default};
@@ -1,132 +0,0 @@
1
- var e=`# Use on your website
2
-
3
- Furifont is a normal web font. Load it with \`@font-face\`, set it on your Japanese text, and the ruby shows. Your HTML does not change: no \`<ruby>\` tags and no JavaScript.
4
-
5
- ## Load the font
6
-
7
- Download the \`.woff2\` files from the [latest release](https://github.com/antfu/furifont/releases/latest) and put them with your site's other files. The variable font (\`VF.woff2\`) has every weight in one file:
8
-
9
- \`\`\`css
10
- @font-face {
11
- font-family: 'Furifont Sans';
12
- src: url('/fonts/FurifontSansVF.woff2') format('woff2');
13
- font-weight: 250 900;
14
- font-display: swap;
15
- }
16
- \`\`\`
17
-
18
- The name in \`font-family\` is yours to choose. The other families are \`FurifontSansRomaji\`, \`FurifontSerif\` and \`FurifontSerifRomaji\`.
19
-
20
- Each font has thousands of words, so a variable font is about 6 MB. Serve it with a long cache time, so the browser downloads it only once.
21
-
22
- To try Furifont without hosting the files, you can load them from this site. These URLs always serve the latest release:
23
-
24
- \`\`\`css
25
- @font-face {
26
- font-family: 'Furifont Sans';
27
- src: url('https://furifont.antfu.me/fonts/FurifontSansVF.woff2') format('woff2');
28
- font-weight: 250 900;
29
- }
30
- \`\`\`
31
-
32
- ## Set it on your text
33
-
34
- \`\`\`css
35
- :lang(ja) {
36
- font-family: 'Furifont Sans', sans-serif;
37
- line-height: 1.8;
38
- }
39
- \`\`\`
40
-
41
- ::docs-example{text="今日は日本語の勉強をします。"}
42
- ::
43
-
44
- **Give the lines room.** The ruby is drawn above the kanji, inside the line. With a \`line-height\` under 1.6, the ruby of one line touches the line above it.
45
-
46
- **Keep your Latin font.** Put your own font first. It sets the Latin letters, and the browser takes the kanji and kana from Furifont:
47
-
48
- \`\`\`css
49
- body {
50
- font-family: Inter, 'Furifont Sans', sans-serif;
51
- }
52
- \`\`\`
53
-
54
- **Align with other fonts.** Furifont makes its line taller at the top, to make room for the ruby. Next to icons or other fonts, its text can then sit a little low. These descriptors put the kanji in the middle of the line, the way this site does:
55
-
56
- \`\`\`css
57
- @font-face {
58
- font-family: 'Furifont Sans';
59
- src: url('/fonts/FurifontSansVF.woff2') format('woff2');
60
- font-weight: 250 900;
61
- ascent-override: 88%;
62
- descent-override: 12%;
63
- line-gap-override: 0%;
64
- }
65
- \`\`\`
66
-
67
- ## CSS controls
68
-
69
- ### Turn the ruby off
70
-
71
- Stylistic set 1 (\`ss01\`) shows the plain kanji. Use it where ruby gets in the way, such as headings, buttons or tables:
72
-
73
- \`\`\`css
74
- h1, button {
75
- font-feature-settings: 'ss01';
76
- }
77
- \`\`\`
78
-
79
- ::docs-example{text="今日は日本語の勉強をします。" css="font-feature-settings: 'ss01'"}
80
- ::
81
-
82
- If your page already has \`<ruby>\` markup, turn Furifont's ruby off inside it, so the text does not get ruby twice:
83
-
84
- \`\`\`css
85
- ruby {
86
- font-feature-settings: 'ss01';
87
- }
88
- \`\`\`
89
-
90
- ### Weight
91
-
92
- The variable font has every weight from 250 (ExtraLight) to 900 (Heavy). The ruby follows the weight of the kanji:
93
-
94
- \`\`\`css
95
- .light { font-weight: 250; }
96
- .heavy { font-weight: 900; }
97
- \`\`\`
98
-
99
- ::docs-example{text="日本語の勉強" css="font-weight: 250"}
100
- ::
101
-
102
- ::docs-example{text="日本語の勉強" css="font-weight: 900"}
103
- ::
104
-
105
- ### Size
106
-
107
- The ruby is part of the font, so it scales with \`font-size\`. Nothing else needs to change.
108
-
109
- ### Choose a reading
110
-
111
- Furifont shows the most common reading of each word. To show another one, set \`salt\` (stylistic alternates) on a \`<span>\` around the word. \`'salt' 2\` shows reading 2:
112
-
113
- \`\`\`html
114
- <span style="font-feature-settings: 'salt' 2">市場</span>
115
- \`\`\`
116
-
117
- ::docs-example{text="市場"}
118
- ::
119
-
120
- ::docs-example{text="市場" css="font-feature-settings: 'salt' 2"}
121
- ::
122
-
123
- The span must hold the whole word, and only that word. \`salt\` acts on the first kanji of the run of kanji in the span.
124
-
125
- \`font-feature-settings\` replaces the whole list from the parent. To keep the ruby off and choose a reading at the same time, write both in one declaration.
126
-
127
- To choose a reading in the text itself, use a variation selector. See [Choose a reading](/docs/readings), which also tells where to find the reading numbers of each word.
128
-
129
- ## Okurigana
130
-
131
- A browser shapes kanji and kana apart, so the font never sees the okurigana after a kanji. It cannot tell 来る from 来ない. To show the right reading there, wrap the kanji in a \`salt\` span as above. The [bookmarklet and the userscript](/#any-page) do this for you on any page.
132
- `;export{e as default};