@nebutra/fonts 0.1.1 → 2.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # @nebutra/fonts
2
+
3
+ ## 2.0.0
@@ -0,0 +1,19 @@
1
+ # Font redistribution notice
2
+
3
+ This package's MIT licence covers **first-party code only**.
4
+
5
+ ## Noto Sans SC
6
+
7
+ 本软件使用了 **Noto Sans SC** 字体。
8
+ This software uses the **Noto Sans SC** typeface.
9
+
10
+ Noto Sans SC is licensed under the SIL Open Font License 1.1. The licence
11
+ text is `vendor/noto-sans-sc/OFL.txt`.
12
+
13
+ Generated `.woff2` subsets stay in this workspace for first-party apps so
14
+ `next/font/local` can load them offline. They are **not** included in the npm
15
+ `files` list and must not be published. Downstream npm consumers do not receive
16
+ font binaries from this package.
17
+
18
+ Do not add `generated/*.woff2` or other font binaries to a publishable `files`
19
+ glob.
package/README.md CHANGED
@@ -54,7 +54,7 @@ const stack = withRegistryFont("Space Grotesk, sans-serif");
54
54
  // "var(--font-space-grotesk), Space Grotesk, sans-serif"
55
55
  ```
56
56
 
57
- ## Simplified Chinese — self-hosted vivo Sans SC
57
+ ## Simplified Chinese — self-hosted Noto Sans SC
58
58
 
59
59
  Geist has no CJK coverage at all, so without a CJK face every Chinese character
60
60
  falls back to whatever the OS supplies: PingFang on macOS, Microsoft YaHei on
@@ -74,7 +74,7 @@ import { GeistSans } from "geist/font/sans";
74
74
  <html className={`${GeistSans.variable} ${GeistMono.variable} ${cjkFontClassName}`}>
75
75
  ```
76
76
 
77
- That defines `--font-vivo-sans-sc`. Nothing else is needed: the token stacks in
77
+ That defines `--font-noto-sans-sc`. Nothing else is needed: the token stacks in
78
78
  `@nebutra/tokens` (`--font-sans`, `--font-cn`, `--font-display`, `--font-heading`)
79
79
  already reference the variable in the right position. The app also needs
80
80
  `"@nebutra/fonts"` in `dependencies` and in `transpilePackages` (the package ships
@@ -88,13 +88,13 @@ duplication is gone; the file now only carries derived aliases.
88
88
  ### Stack order is the design decision
89
89
 
90
90
  ```css
91
- font-family: var(--font-geist-sans), "Geist", var(--font-vivo-sans-sc), "Noto Sans SC", …;
91
+ font-family: var(--font-geist-sans), "Geist", var(--font-noto-sans-sc), "Noto Sans SC", …;
92
92
  ```
93
93
 
94
94
  Geist comes **first** and keeps Latin and the numerals — its tabular figures and
95
95
  tighter x-height are what dense dashboard tables need, and it is the locked UI
96
- face. vivo Sans SC takes CJK. Both faces cover Latin, so the *order* is what
97
- decides: reversed, vivo Sans would take the Latin too, and its Latin is not as
96
+ face. Noto Sans SC takes CJK. Both faces cover Latin, so the *order* is what
97
+ decides: reversed, Noto would take the Latin too, and its Latin is not as
98
98
  good as Geist's for UI.
99
99
 
100
100
  Belt and braces: the generated `@font-face` rules carry a `unicode-range` with
@@ -102,56 +102,18 @@ no Latin, no ASCII and no general-punctuation codepoints in it, so a Latin-only
102
102
  page can never trigger a CJK download even if a stack somewhere is written the
103
103
  wrong way round. Geist Mono remains the code face.
104
104
 
105
- ### Verified, not assumed
106
-
107
- Measured in Chromium against a running app (`apps/typelens`, dev and production
108
- build), reading the fonts the engine actually used per text run via
109
- `CSS.getPlatformFontsForNode` — not by eye and not from the declared stack:
110
-
111
- | Probe | Face actually used |
112
- |---|---|
113
- | `Handgloves ABC` | Geist |
114
- | `1234567890` | Geist |
115
- | `开始设置的一二三` @400 | vivo Sans |
116
- | `开始设置的一二三` @500 | vivo Sans Medium |
117
- | `开始设置的一二三` @600 | vivo Sans Demibold |
118
- | `开始设置的一二三` @700 | vivo Sans Demibold (no synthesis — `font-synthesis: none`) |
119
- | `。、!?()` | vivo Sans |
120
- | `Nebutra 云毓 2026` | Geist for Latin + digits, vivo Sans for 云, PingFang SC for 毓 |
121
-
122
- The last row is the design working as intended: 毓 is a GB2312 **level-2**
123
- character, outside the subset, so it falls through the stack instead of bloating
124
- every page. A Latin-only route (`/this-route-does-not-exist`) requested
125
- `Geist_Variable` and **nothing else** — zero CJK bytes. The production build emits
126
- exactly three woff2 files (498,084 / 504,228 / 504,332 B, byte-identical to the
127
- package) and preloads only the two Geist files.
128
-
129
- Note that `document.fonts.check("16px vivoSansCn", "A")` returns `true`. That is
130
- the vacuous-true case in the spec — no face in the family matches U+0041's
131
- `unicode-range`, so "all matching faces are loaded" is trivially satisfied. It is
132
- not evidence of Latin coverage; the platform-font table above is.
133
-
134
105
  ### Building the subsets
135
106
 
136
107
  ```bash
137
- pnpm --filter @nebutra/fonts subset:cjk # idempotent; reports every byte size
138
- pnpm --filter @nebutra/fonts subset:cjk -- --force
108
+ FONTTOOLS_PYTHON=/path/to/python \
109
+ pnpm --filter @nebutra/fonts subset:cjk -- --force
139
110
  ```
140
111
 
141
- Requires `python3` with `fontTools` and `brotli` (for `--flavor=woff2`).
142
- `woff2_compress` is not needed. Outputs land in `generated/`:
143
-
144
- | File | Weight | Size |
145
- |---|---|---|
146
- | `vivo-sans-sc-400.woff2` | 400 body | 498,084 B (486.4 KB) |
147
- | `vivo-sans-sc-500.woff2` | 500 `--font-weight-medium` | 504,228 B (492.4 KB) |
148
- | `vivo-sans-sc-600.woff2` | 600 `--font-weight-heading` | 504,332 B (492.5 KB) |
149
- | `vivo-sans-cn.css` | `@font-face` rules | 1,813 B |
150
- | `generated/index.ts` | face metadata for `next/font/local` | 1,398 B |
151
-
152
- Sizes move by a few hundred bytes as Chinese copy lands — the catalog character
153
- count is an input, not a constant. `generated/subset-manifest.json` records the
154
- exact character count and byte size of the build actually on disk.
112
+ Requires Python with `fontTools` and `brotli` (for `--flavor=woff2`).
113
+ The script downloads the OFL Noto Sans SC variable face, instances 400 / 500 /
114
+ 600 / 700, then subsets. Outputs land in `generated/`. The committed woff2
115
+ files are the SIL OFL Noto Sans SC chinese-simplified faces used by
116
+ `next/font/local` so a clean clone does not need fontTools to render text.
155
117
 
156
118
  ### Why three weights
157
119
 
@@ -168,12 +130,9 @@ Each weight costs ~490 KB, so shipping all nine static faces would be ~4.4 MB.
168
130
 
169
131
  ### Why the static faces, not the variable one
170
132
 
171
- `vivoSansSCVF.ttf` is 42 MB. Subset to this exact character set it is still
172
- 1,070,240 B, because a variable CJK font carries per-weight deltas for every
173
- glyph it keeps — one variable file costs more than all three static subsets on
174
- the pages that only use one weight. `vivo Sans SC L3` is *not* usable as a body
175
- face: 60,339 characters but zero in the CJK basic block, it is a rare-plane
176
- supplement.
133
+ A variable CJK font carries per-weight deltas for every glyph it keeps, so one
134
+ variable file costs more than the static weights a page actually uses. The
135
+ pipeline instances 400 / 500 / 600 / 700 and subsets each one.
177
136
 
178
137
  ### Character set
179
138
 
@@ -212,23 +171,19 @@ weight, the full set to ~498,000 B.
212
171
 
213
172
  ### Vendored sources
214
173
 
215
- `vendor/vivo-sans/` holds only the three static TTFs the pipeline consumes —
216
- `vivoSans-Regular.ttf`, `vivoSans-Medium.ttf`, `vivoSans-DemiBold.ttf` (7.4 MB
217
- each) — not all 33 faces from the licensed set, and not the 42 MB variable font.
218
- The licence agreement is committed beside them as
219
- `vendor/vivo-sans/LICENCE-vivo-Sans.txt`. `VIVO_SANS_SOURCE_DIR` points the
220
- script at the licensed originals when re-vendoring.
174
+ `vendor/noto-sans-sc/OFL.txt` is committed. Full source TTFs are downloaded by
175
+ `subset:cjk` and gitignored. Do not commit unmodified CJK source faces.
221
176
 
222
177
  ## Third-party font attribution
223
178
 
224
- 本软件使用了 **vivo Sans** 字体。
225
- This software uses the **vivo Sans** typeface.
179
+ 本软件使用了 **Noto Sans SC** 字体。
180
+ This software uses the **Noto Sans SC** typeface.
226
181
 
227
- Per clause 2.1 of the vivo Sans 字体知识产权许可协议 (committed at
228
- `vendor/vivo-sans/LICENCE-vivo-Sans.txt`): 您应在软件中特别注明使用了 vivo Sans 字体.
229
- vivo Sans is licensed from vivo Mobile Communication Co., Ltd. and is **not**
230
- covered by this package's MIT licence, which applies to the code only. Any
231
- redistribution of the generated `.woff2` files carries the same obligation.
182
+ Noto Sans SC is licensed under the SIL Open Font License 1.1
183
+ (`vendor/noto-sans-sc/OFL.txt`). That licence is separate from this package's
184
+ MIT licence, which applies to first-party code only. Generated `.woff2` files
185
+ stay in the workspace for first-party apps and are excluded from the npm
186
+ tarball. See `NOTICE-FONTS.md`.
232
187
 
233
188
  ## Registered Families
234
189
 
@@ -244,4 +199,5 @@ uses the corresponding CSS variable.
244
199
 
245
200
  ## License
246
201
 
247
- MIT
202
+ MIT for first-party code. Noto Sans SC binaries are SIL OFL 1.1 and are not
203
+ published to npm.
@@ -0,0 +1,27 @@
1
+ // src/next-cjk.ts
2
+ import localFont from "next/font/local";
3
+ var notoSansSc = localFont({
4
+ src: [
5
+ { path: "../generated/noto-sans-sc-400.woff2", weight: "400", style: "normal" },
6
+ { path: "../generated/noto-sans-sc-500.woff2", weight: "500", style: "normal" },
7
+ { path: "../generated/noto-sans-sc-600.woff2", weight: "600", style: "normal" },
8
+ { path: "../generated/noto-sans-sc-700.woff2", weight: "700", style: "normal" }
9
+ ],
10
+ declarations: [
11
+ {
12
+ prop: "unicode-range",
13
+ value: "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF"
14
+ }
15
+ ],
16
+ display: "swap",
17
+ preload: false,
18
+ adjustFontFallback: false,
19
+ variable: "--font-noto-sans-sc"
20
+ });
21
+ var cjkFontClassName = notoSansSc.variable;
22
+
23
+ export {
24
+ notoSansSc,
25
+ cjkFontClassName
26
+ };
27
+ //# sourceMappingURL=chunk-GRE7GS6W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/next-cjk.ts"],"sourcesContent":["/**\n * @nebutra/fonts/next/cjk — the self-hosted Simplified-Chinese face (server-only).\n *\n * WHY A SEPARATE ENTRY FROM `./next`: that module declares ~16 `next/font/google`\n * faces for the theme / DESIGN.md registry. Importing it just to get the CJK face\n * would drag those build-time Google downloads into every app — and this repo has\n * a known trap where `next/font/google` fails outright in a network-sandboxed dev\n * server. This file imports `next/font/local` ONLY: the woff2 files live in the\n * workspace `generated/` directory (not the npm tarball), so first-party apps\n * work offline, in CI, and in the sandbox. `./next` re-exports it,\n * so an app already applying `fontRegistryClassName` still only needs one import.\n *\n * WHY SELF-HOSTED AT ALL: Geist has no CJK coverage, so without this every Chinese\n * character falls back to whatever the OS supplies — PingFang on macOS, Microsoft\n * YaHei on Windows, something else on Android. Chinese copy is a first-class\n * surface here (see docs/microcopy/), so the face is pinned rather than left to\n * the OS.\n *\n * The files are built by `pnpm --filter @nebutra/fonts subset:cjk` from\n * Noto Sans SC (SIL OFL) and live in the workspace `generated/` directory.\n * The literal `src` list below mirrors NOTO_SANS_SC_SOURCES in\n * ../generated/index.ts (a drift test in ./next-cjk.test.ts asserts they agree).\n * It is spelled out rather than spread because next/font is a compile-time\n * transform — SWC statically analyses this call, so the options object cannot\n * be computed.\n */\n\nimport localFont from \"next/font/local\";\n\n/**\n * Noto Sans SC — 400 / 500 / 600 / 700 static subsets.\n *\n * - `preload: false` on purpose. Each weight is hundreds of KB; preloading them\n * on every route would tax Latin-only pages for nothing. The browser fetches\n * a weight only when a glyph in the `unicode-range` below actually renders.\n * - `declarations` carries that `unicode-range` (CJK blocks only — no ASCII, no\n * Latin, no general punctuation), so a Latin-only page can never trigger a CJK\n * download even if a font stack somewhere is written the wrong way round.\n * - `adjustFontFallback: false` — next/font's metric-matched fallback is derived\n * from Arial, which is meaningless for a Han face.\n */\nexport const notoSansSc = localFont({\n src: [\n { path: \"../generated/noto-sans-sc-400.woff2\", weight: \"400\", style: \"normal\" },\n { path: \"../generated/noto-sans-sc-500.woff2\", weight: \"500\", style: \"normal\" },\n { path: \"../generated/noto-sans-sc-600.woff2\", weight: \"600\", style: \"normal\" },\n { path: \"../generated/noto-sans-sc-700.woff2\", weight: \"700\", style: \"normal\" },\n ],\n declarations: [\n {\n prop: \"unicode-range\",\n value: \"U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF\",\n },\n ],\n display: \"swap\",\n preload: false,\n adjustFontFallback: false,\n variable: \"--font-noto-sans-sc\",\n});\n\n/**\n * Apply to <html> next to the Geist loaders so `--font-noto-sans-sc` exists:\n *\n * className={`${GeistSans.variable} ${GeistMono.variable} ${cjkFontClassName}`}\n *\n * The token stacks (`--font-sans` / `--font-cn` / `--font-display` in\n * @nebutra/tokens) reference the variable AFTER Geist, so Geist keeps Latin and\n * the numerals and only CJK falls through to this face.\n */\nexport const cjkFontClassName = notoSansSc.variable;\n"],"mappings":";AA2BA,OAAO,eAAe;AAcf,IAAM,aAAa,UAAU;AAAA,EAClC,KAAK;AAAA,IACH,EAAE,MAAM,uCAAuC,QAAQ,OAAO,OAAO,SAAS;AAAA,IAC9E,EAAE,MAAM,uCAAuC,QAAQ,OAAO,OAAO,SAAS;AAAA,IAC9E,EAAE,MAAM,uCAAuC,QAAQ,OAAO,OAAO,SAAS;AAAA,IAC9E,EAAE,MAAM,uCAAuC,QAAQ,OAAO,OAAO,SAAS;AAAA,EAChF;AAAA,EACA,cAAc;AAAA,IACZ;AAAA,MACE,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS;AAAA,EACT,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,UAAU;AACZ,CAAC;AAWM,IAAM,mBAAmB,WAAW;","names":[]}
@@ -1,42 +1,36 @@
1
1
  /**
2
- * GENERATED FILE, DO NOT EDIT.
3
- * Written by packages/design/fonts/scripts/subset-cjk.mjs.
4
- *
5
- * Metadata for the self-hosted Simplified-Chinese faces, in the shape
6
- * `next/font/local` expects, so the server entry (`@nebutra/fonts/next`) can
7
- * declare the face without re-stating weights or file names. The plain
8
- * `vivo-sans-cn.css` next to this file is the non-Next consumer path.
9
- *
10
- * The registry key is "vivo sans sc" (see FONT_REGISTRY in ../src/index.ts);
11
- * the CSS variable is "--font-vivo-sans-sc".
2
+ * GENERATED FILE — face metadata for `@nebutra/fonts/next/cjk`.
3
+ * Current binaries are SIL OFL Noto Sans SC (chinese-simplified) woff2 files.
4
+ * Rebuild with `pnpm --filter @nebutra/fonts subset:cjk` when FONTTOOLS_PYTHON
5
+ * is available, or replace the woff2 files from an OFL source.
12
6
  */
13
- declare const VIVO_SANS_CN_VARIABLE: "--font-vivo-sans-sc";
14
- declare const VIVO_SANS_CN_FAMILY: "vivo Sans SC";
7
+ declare const NOTO_SANS_SC_VARIABLE: "--font-noto-sans-sc";
8
+ declare const NOTO_SANS_SC_FAMILY: "Noto Sans SC";
15
9
  /** Characters covered per face (catalogs ∪ CJK punctuation ∪ GB2312 level-1). */
16
- declare const VIVO_SANS_CN_CHAR_COUNT: 4282;
10
+ declare const NOTO_SANS_SC_CHAR_COUNT: 4282;
17
11
  /** `unicode-range` of every generated @font-face — CJK only, no Latin. */
18
- declare const VIVO_SANS_CN_UNICODE_RANGE: "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
12
+ declare const NOTO_SANS_SC_UNICODE_RANGE: "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
19
13
  /** Sources for `next/font/local({ src: [...] })`, paths relative to this file. */
20
- declare const VIVO_SANS_CN_SOURCES: readonly [{
21
- readonly path: "./vivo-sans-sc-400.woff2";
14
+ declare const NOTO_SANS_SC_SOURCES: readonly [{
15
+ readonly path: "./noto-sans-sc-400.woff2";
22
16
  readonly weight: "400";
23
17
  readonly style: "normal";
24
- readonly bytes: 498084;
18
+ readonly bytes: 1142552;
25
19
  }, {
26
- readonly path: "./vivo-sans-sc-500.woff2";
20
+ readonly path: "./noto-sans-sc-500.woff2";
27
21
  readonly weight: "500";
28
22
  readonly style: "normal";
29
- readonly bytes: 504228;
23
+ readonly bytes: 1159128;
30
24
  }, {
31
- readonly path: "./vivo-sans-sc-600.woff2";
25
+ readonly path: "./noto-sans-sc-600.woff2";
32
26
  readonly weight: "600";
33
27
  readonly style: "normal";
34
- readonly bytes: 504332;
28
+ readonly bytes: 1162352;
35
29
  }, {
36
- readonly path: "./vivo-sans-sc-700.woff2";
30
+ readonly path: "./noto-sans-sc-700.woff2";
37
31
  readonly weight: "700";
38
32
  readonly style: "normal";
39
- readonly bytes: 506808;
33
+ readonly bytes: 1172244;
40
34
  }];
41
35
 
42
- export { VIVO_SANS_CN_CHAR_COUNT, VIVO_SANS_CN_FAMILY, VIVO_SANS_CN_SOURCES, VIVO_SANS_CN_UNICODE_RANGE, VIVO_SANS_CN_VARIABLE };
36
+ export { NOTO_SANS_SC_CHAR_COUNT, NOTO_SANS_SC_FAMILY, NOTO_SANS_SC_SOURCES, NOTO_SANS_SC_UNICODE_RANGE, NOTO_SANS_SC_VARIABLE };
@@ -1,19 +1,19 @@
1
1
  // generated/index.ts
2
- var VIVO_SANS_CN_VARIABLE = "--font-vivo-sans-sc";
3
- var VIVO_SANS_CN_FAMILY = "vivo Sans SC";
4
- var VIVO_SANS_CN_CHAR_COUNT = 4282;
5
- var VIVO_SANS_CN_UNICODE_RANGE = "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
6
- var VIVO_SANS_CN_SOURCES = [
7
- { path: "./vivo-sans-sc-400.woff2", weight: "400", style: "normal", bytes: 498084 },
8
- { path: "./vivo-sans-sc-500.woff2", weight: "500", style: "normal", bytes: 504228 },
9
- { path: "./vivo-sans-sc-600.woff2", weight: "600", style: "normal", bytes: 504332 },
10
- { path: "./vivo-sans-sc-700.woff2", weight: "700", style: "normal", bytes: 506808 }
2
+ var NOTO_SANS_SC_VARIABLE = "--font-noto-sans-sc";
3
+ var NOTO_SANS_SC_FAMILY = "Noto Sans SC";
4
+ var NOTO_SANS_SC_CHAR_COUNT = 4282;
5
+ var NOTO_SANS_SC_UNICODE_RANGE = "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF";
6
+ var NOTO_SANS_SC_SOURCES = [
7
+ { path: "./noto-sans-sc-400.woff2", weight: "400", style: "normal", bytes: 1142552 },
8
+ { path: "./noto-sans-sc-500.woff2", weight: "500", style: "normal", bytes: 1159128 },
9
+ { path: "./noto-sans-sc-600.woff2", weight: "600", style: "normal", bytes: 1162352 },
10
+ { path: "./noto-sans-sc-700.woff2", weight: "700", style: "normal", bytes: 1172244 }
11
11
  ];
12
12
  export {
13
- VIVO_SANS_CN_CHAR_COUNT,
14
- VIVO_SANS_CN_FAMILY,
15
- VIVO_SANS_CN_SOURCES,
16
- VIVO_SANS_CN_UNICODE_RANGE,
17
- VIVO_SANS_CN_VARIABLE
13
+ NOTO_SANS_SC_CHAR_COUNT,
14
+ NOTO_SANS_SC_FAMILY,
15
+ NOTO_SANS_SC_SOURCES,
16
+ NOTO_SANS_SC_UNICODE_RANGE,
17
+ NOTO_SANS_SC_VARIABLE
18
18
  };
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../generated/index.ts"],"sourcesContent":["/**\n * GENERATED FILE, DO NOT EDIT.\n * Written by packages/design/fonts/scripts/subset-cjk.mjs.\n *\n * Metadata for the self-hosted Simplified-Chinese faces, in the shape\n * `next/font/local` expects, so the server entry (`@nebutra/fonts/next`) can\n * declare the face without re-stating weights or file names. The plain\n * `vivo-sans-cn.css` next to this file is the non-Next consumer path.\n *\n * The registry key is \"vivo sans sc\" (see FONT_REGISTRY in ../src/index.ts);\n * the CSS variable is \"--font-vivo-sans-sc\".\n */\n\nexport const VIVO_SANS_CN_VARIABLE = \"--font-vivo-sans-sc\" as const;\n\nexport const VIVO_SANS_CN_FAMILY = \"vivo Sans SC\" as const;\n\n/** Characters covered per face (catalogs ∪ CJK punctuation ∪ GB2312 level-1). */\nexport const VIVO_SANS_CN_CHAR_COUNT = 4282 as const;\n\n/** `unicode-range` of every generated @font-face — CJK only, no Latin. */\nexport const VIVO_SANS_CN_UNICODE_RANGE = \"U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF\" as const;\n\n/** Sources for `next/font/local({ src: [...] })`, paths relative to this file. */\nexport const VIVO_SANS_CN_SOURCES = [\n { path: \"./vivo-sans-sc-400.woff2\", weight: \"400\", style: \"normal\", bytes: 498084 },\n { path: \"./vivo-sans-sc-500.woff2\", weight: \"500\", style: \"normal\", bytes: 504228 },\n { path: \"./vivo-sans-sc-600.woff2\", weight: \"600\", style: \"normal\", bytes: 504332 },\n { path: \"./vivo-sans-sc-700.woff2\", weight: \"700\", style: \"normal\", bytes: 506808 },\n] as const;\n"],"mappings":";AAaO,IAAM,wBAAwB;AAE9B,IAAM,sBAAsB;AAG5B,IAAM,0BAA0B;AAGhC,IAAM,6BAA6B;AAGnC,IAAM,uBAAuB;AAAA,EAClC,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,OAAO;AAAA,EAClF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,OAAO;AAAA,EAClF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,OAAO;AAAA,EAClF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,OAAO;AACpF;","names":[]}
1
+ {"version":3,"sources":["../../generated/index.ts"],"sourcesContent":["/**\n * GENERATED FILE — face metadata for `@nebutra/fonts/next/cjk`.\n * Current binaries are SIL OFL Noto Sans SC (chinese-simplified) woff2 files.\n * Rebuild with `pnpm --filter @nebutra/fonts subset:cjk` when FONTTOOLS_PYTHON\n * is available, or replace the woff2 files from an OFL source.\n */\n\nexport const NOTO_SANS_SC_VARIABLE = \"--font-noto-sans-sc\" as const;\n\nexport const NOTO_SANS_SC_FAMILY = \"Noto Sans SC\" as const;\n\n/** Characters covered per face (catalogs ∪ CJK punctuation ∪ GB2312 level-1). */\nexport const NOTO_SANS_SC_CHAR_COUNT = 4282 as const;\n\n/** `unicode-range` of every generated @font-face — CJK only, no Latin. */\nexport const NOTO_SANS_SC_UNICODE_RANGE =\n \"U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF\" as const;\n\n/** Sources for `next/font/local({ src: [...] })`, paths relative to this file. */\nexport const NOTO_SANS_SC_SOURCES = [\n { path: \"./noto-sans-sc-400.woff2\", weight: \"400\", style: \"normal\", bytes: 1142552 },\n { path: \"./noto-sans-sc-500.woff2\", weight: \"500\", style: \"normal\", bytes: 1159128 },\n { path: \"./noto-sans-sc-600.woff2\", weight: \"600\", style: \"normal\", bytes: 1162352 },\n { path: \"./noto-sans-sc-700.woff2\", weight: \"700\", style: \"normal\", bytes: 1172244 },\n] as const;\n"],"mappings":";AAOO,IAAM,wBAAwB;AAE9B,IAAM,sBAAsB;AAG5B,IAAM,0BAA0B;AAGhC,IAAM,6BACX;AAGK,IAAM,uBAAuB;AAAA,EAClC,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,QAAQ;AAAA,EACnF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,QAAQ;AAAA,EACnF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,QAAQ;AAAA,EACnF,EAAE,MAAM,4BAA4B,QAAQ,OAAO,OAAO,UAAU,OAAO,QAAQ;AACrF;","names":[]}
package/dist/index.d.ts CHANGED
@@ -28,5 +28,22 @@ declare function resolveRegistryVar(stack: string): string | undefined;
28
28
  * e.g. "Space Grotesk, sans-serif" → "var(--font-space-grotesk), Space Grotesk, sans-serif"
29
29
  */
30
30
  declare function withRegistryFont(stack: string | undefined): string | undefined;
31
+ /**
32
+ * Like `withRegistryFont`, but matches the first registered family ANYWHERE in
33
+ * the stack rather than only in first position.
34
+ *
35
+ * A brand package names the typeface the design language actually uses, and
36
+ * those are frequently licensed faces we have no right to serve — Söhne, Mori,
37
+ * Lyon Text, Reckless. The declared stack already says what to do when they are
38
+ * absent: fall to the next family. But "the next family" is usually a bare name
39
+ * like `Inter`, which does NOT reach next/font's hashed face, so the stack
40
+ * skidded past every self-hosted option and landed on `ui-sans-serif`. All
41
+ * seven built-in design languages rendered in the system font until 2026-08-18.
42
+ *
43
+ * Prepending the nearest registered family produces exactly the outcome the
44
+ * declared chain intended, and leaves the licensed names in place so a customer
45
+ * who does own the font still gets it by shipping the face themselves.
46
+ */
47
+ declare function withNearestRegistryFont(stack: string | undefined): string | undefined;
31
48
 
32
- export { FONT_REGISTRY, primaryFamily, resolveRegistryVar, withRegistryFont };
49
+ export { FONT_REGISTRY, primaryFamily, resolveRegistryVar, withNearestRegistryFont, withRegistryFont };
package/dist/index.js CHANGED
@@ -5,13 +5,16 @@ var FONT_REGISTRY = {
5
5
  "geist sans": "--font-geist-sans",
6
6
  "geist mono": "--font-geist-mono",
7
7
  // Self-hosted via next/font/local from the subset built in ./generated (see
8
- // ./next-cjk). The Simplified-Chinese face — CJK only, it carries no Latin or
9
- // digit glyphs, so it can never take Latin away from Geist.
10
- "vivo sans sc": "--font-vivo-sans-sc",
8
+ // ./next-cjk). The Simplified-Chinese face — CJK only via unicode-range, so it
9
+ // cannot take Latin away from Geist.
10
+ "noto sans sc": "--font-noto-sans-sc",
11
11
  // Self-hosted via next/font/google (see ./next)
12
12
  inter: "--font-inter",
13
+ "inter tight": "--font-reg-inter-tight",
13
14
  "space grotesk": "--font-space-grotesk",
14
15
  "playfair display": "--font-playfair-display",
16
+ fraunces: "--font-reg-fraunces",
17
+ "source serif 4": "--font-reg-source-serif-4",
15
18
  "jetbrains mono": "--font-jetbrains-mono",
16
19
  manrope: "--font-reg-manrope",
17
20
  sora: "--font-reg-sora",
@@ -40,10 +43,19 @@ function withRegistryFont(stack) {
40
43
  const variable = resolveRegistryVar(stack);
41
44
  return variable ? `var(${variable}), ${stack}` : stack;
42
45
  }
46
+ function withNearestRegistryFont(stack) {
47
+ if (!stack) return stack;
48
+ for (const token of stack.split(",")) {
49
+ const variable = FONT_REGISTRY[normalizeFamily(token)];
50
+ if (variable) return `var(${variable}), ${stack}`;
51
+ }
52
+ return stack;
53
+ }
43
54
  export {
44
55
  FONT_REGISTRY,
45
56
  primaryFamily,
46
57
  resolveRegistryVar,
58
+ withNearestRegistryFont,
47
59
  withRegistryFont
48
60
  };
49
61
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @nebutra/fonts — self-hosted OSS font registry (client-safe entry).\n *\n * Maps a normalized theme / DESIGN.md font-family name to the CSS variable that\n * the build-time self-hosted face defines (declared with next/font in\n * `@nebutra/fonts/next`, applied to <html> via `fontRegistryClassName`).\n *\n * WHY: next/font registers each face under a HASHED family name reachable ONLY\n * via its CSS variable — `font-family: 'Inter'` does NOT use the self-hosted\n * Inter. So when a theme / imported DESIGN.md font's primary family matches an\n * entry here, callers prepend `var(--font-…)` to the stack, making the\n * self-hosted font actually render — with ZERO runtime external requests\n * (next/font self-hosts at build time) and next/font's automatic metric-matched\n * fallback (no layout shift). Unmatched families keep their declared stack.\n *\n * This entry is FREE of `next/font` imports so client modules can use it.\n * The `./next` subpath holds the (server-only) next/font declarations and MUST\n * keep its CSS-variable names in sync with FONT_REGISTRY below.\n */\n\nexport const FONT_REGISTRY: Record<string, string> = {\n // Self-hosted via geist/font (default brand faces, loaded by the app shell)\n geist: \"--font-geist-sans\",\n \"geist sans\": \"--font-geist-sans\",\n \"geist mono\": \"--font-geist-mono\",\n // Self-hosted via next/font/local from the subset built in ./generated (see\n // ./next-cjk). The Simplified-Chinese face — CJK only, it carries no Latin or\n // digit glyphs, so it can never take Latin away from Geist.\n \"vivo sans sc\": \"--font-vivo-sans-sc\",\n // Self-hosted via next/font/google (see ./next)\n inter: \"--font-inter\",\n \"space grotesk\": \"--font-space-grotesk\",\n \"playfair display\": \"--font-playfair-display\",\n \"jetbrains mono\": \"--font-jetbrains-mono\",\n manrope: \"--font-reg-manrope\",\n sora: \"--font-reg-sora\",\n \"work sans\": \"--font-reg-work-sans\",\n \"dm sans\": \"--font-reg-dm-sans\",\n \"plus jakarta sans\": \"--font-reg-plus-jakarta-sans\",\n outfit: \"--font-reg-outfit\",\n figtree: \"--font-reg-figtree\",\n montserrat: \"--font-reg-montserrat\",\n lexend: \"--font-reg-lexend\",\n \"fira code\": \"--font-reg-fira-code\",\n \"roboto mono\": \"--font-reg-roboto-mono\",\n \"source code pro\": \"--font-reg-source-code-pro\",\n};\n\n/** Normalize a single font-family token: strip quotes/whitespace, lowercase. */\nfunction normalizeFamily(name: string): string {\n // Strip ALL quotes with a quantifier-free global replace (quotes only appear\n // at token boundaries in a font-family value). Avoids the end-anchored /['\"]+$/\n // form, which CodeQL flags as polynomial ReDoS (scanned from every position).\n return name.replace(/['\"]/g, \"\").trim().toLowerCase();\n}\n\n/** The first (primary) family in a CSS font-family list, normalized. */\nexport function primaryFamily(stack: string): string {\n return normalizeFamily(stack.split(\",\")[0] ?? \"\");\n}\n\n/** Registry CSS variable for a stack's primary family, or undefined. */\nexport function resolveRegistryVar(stack: string): string | undefined {\n return FONT_REGISTRY[primaryFamily(stack)];\n}\n\n/**\n * Return `stack` with the self-hosted registry font prepended when its primary\n * family is registered; otherwise return it unchanged.\n * e.g. \"Space Grotesk, sans-serif\" → \"var(--font-space-grotesk), Space Grotesk, sans-serif\"\n */\nexport function withRegistryFont(stack: string | undefined): string | undefined {\n if (!stack) return stack;\n const variable = resolveRegistryVar(stack);\n return variable ? `var(${variable}), ${stack}` : stack;\n}\n"],"mappings":";AAoBO,IAAM,gBAAwC;AAAA;AAAA,EAEnD,OAAO;AAAA,EACP,cAAc;AAAA,EACd,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,gBAAgB;AAAA;AAAA,EAEhB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AACrB;AAGA,SAAS,gBAAgB,MAAsB;AAI7C,SAAO,KAAK,QAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,YAAY;AACtD;AAGO,SAAS,cAAc,OAAuB;AACnD,SAAO,gBAAgB,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,EAAE;AAClD;AAGO,SAAS,mBAAmB,OAAmC;AACpE,SAAO,cAAc,cAAc,KAAK,CAAC;AAC3C;AAOO,SAAS,iBAAiB,OAA+C;AAC9E,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,WAAW,mBAAmB,KAAK;AACzC,SAAO,WAAW,OAAO,QAAQ,MAAM,KAAK,KAAK;AACnD;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @nebutra/fonts — self-hosted OSS font registry (client-safe entry).\n *\n * Maps a normalized theme / DESIGN.md font-family name to the CSS variable that\n * the build-time self-hosted face defines (declared with next/font in\n * `@nebutra/fonts/next`, applied to <html> via `fontRegistryClassName`).\n *\n * WHY: next/font registers each face under a HASHED family name reachable ONLY\n * via its CSS variable — `font-family: 'Inter'` does NOT use the self-hosted\n * Inter. So when a theme / imported DESIGN.md font's primary family matches an\n * entry here, callers prepend `var(--font-…)` to the stack, making the\n * self-hosted font actually render — with ZERO runtime external requests\n * (next/font self-hosts at build time) and next/font's automatic metric-matched\n * fallback (no layout shift). Unmatched families keep their declared stack.\n *\n * This entry is FREE of `next/font` imports so client modules can use it.\n * The `./next` subpath holds the (server-only) next/font declarations and MUST\n * keep its CSS-variable names in sync with FONT_REGISTRY below.\n */\n\nexport const FONT_REGISTRY: Record<string, string> = {\n // Self-hosted via geist/font (default brand faces, loaded by the app shell)\n geist: \"--font-geist-sans\",\n \"geist sans\": \"--font-geist-sans\",\n \"geist mono\": \"--font-geist-mono\",\n // Self-hosted via next/font/local from the subset built in ./generated (see\n // ./next-cjk). The Simplified-Chinese face — CJK only via unicode-range, so it\n // cannot take Latin away from Geist.\n \"noto sans sc\": \"--font-noto-sans-sc\",\n // Self-hosted via next/font/google (see ./next)\n inter: \"--font-inter\",\n \"inter tight\": \"--font-reg-inter-tight\",\n \"space grotesk\": \"--font-space-grotesk\",\n \"playfair display\": \"--font-playfair-display\",\n fraunces: \"--font-reg-fraunces\",\n \"source serif 4\": \"--font-reg-source-serif-4\",\n \"jetbrains mono\": \"--font-jetbrains-mono\",\n manrope: \"--font-reg-manrope\",\n sora: \"--font-reg-sora\",\n \"work sans\": \"--font-reg-work-sans\",\n \"dm sans\": \"--font-reg-dm-sans\",\n \"plus jakarta sans\": \"--font-reg-plus-jakarta-sans\",\n outfit: \"--font-reg-outfit\",\n figtree: \"--font-reg-figtree\",\n montserrat: \"--font-reg-montserrat\",\n lexend: \"--font-reg-lexend\",\n \"fira code\": \"--font-reg-fira-code\",\n \"roboto mono\": \"--font-reg-roboto-mono\",\n \"source code pro\": \"--font-reg-source-code-pro\",\n};\n\n/** Normalize a single font-family token: strip quotes/whitespace, lowercase. */\nfunction normalizeFamily(name: string): string {\n // Strip ALL quotes with a quantifier-free global replace (quotes only appear\n // at token boundaries in a font-family value). Avoids the end-anchored /['\"]+$/\n // form, which CodeQL flags as polynomial ReDoS (scanned from every position).\n return name.replace(/['\"]/g, \"\").trim().toLowerCase();\n}\n\n/** The first (primary) family in a CSS font-family list, normalized. */\nexport function primaryFamily(stack: string): string {\n return normalizeFamily(stack.split(\",\")[0] ?? \"\");\n}\n\n/** Registry CSS variable for a stack's primary family, or undefined. */\nexport function resolveRegistryVar(stack: string): string | undefined {\n return FONT_REGISTRY[primaryFamily(stack)];\n}\n\n/**\n * Return `stack` with the self-hosted registry font prepended when its primary\n * family is registered; otherwise return it unchanged.\n * e.g. \"Space Grotesk, sans-serif\" → \"var(--font-space-grotesk), Space Grotesk, sans-serif\"\n */\nexport function withRegistryFont(stack: string | undefined): string | undefined {\n if (!stack) return stack;\n const variable = resolveRegistryVar(stack);\n return variable ? `var(${variable}), ${stack}` : stack;\n}\n\n/**\n * Like `withRegistryFont`, but matches the first registered family ANYWHERE in\n * the stack rather than only in first position.\n *\n * A brand package names the typeface the design language actually uses, and\n * those are frequently licensed faces we have no right to serve — Söhne, Mori,\n * Lyon Text, Reckless. The declared stack already says what to do when they are\n * absent: fall to the next family. But \"the next family\" is usually a bare name\n * like `Inter`, which does NOT reach next/font's hashed face, so the stack\n * skidded past every self-hosted option and landed on `ui-sans-serif`. All\n * seven built-in design languages rendered in the system font until 2026-08-18.\n *\n * Prepending the nearest registered family produces exactly the outcome the\n * declared chain intended, and leaves the licensed names in place so a customer\n * who does own the font still gets it by shipping the face themselves.\n */\nexport function withNearestRegistryFont(stack: string | undefined): string | undefined {\n if (!stack) return stack;\n for (const token of stack.split(\",\")) {\n const variable = FONT_REGISTRY[normalizeFamily(token)];\n if (variable) return `var(${variable}), ${stack}`;\n }\n return stack;\n}\n"],"mappings":";AAoBO,IAAM,gBAAwC;AAAA;AAAA,EAEnD,OAAO;AAAA,EACP,cAAc;AAAA,EACd,cAAc;AAAA;AAAA;AAAA;AAAA,EAId,gBAAgB;AAAA;AAAA,EAEhB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,qBAAqB;AAAA,EACrB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,mBAAmB;AACrB;AAGA,SAAS,gBAAgB,MAAsB;AAI7C,SAAO,KAAK,QAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,YAAY;AACtD;AAGO,SAAS,cAAc,OAAuB;AACnD,SAAO,gBAAgB,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,EAAE;AAClD;AAGO,SAAS,mBAAmB,OAAmC;AACpE,SAAO,cAAc,cAAc,KAAK,CAAC;AAC3C;AAOO,SAAS,iBAAiB,OAA+C;AAC9E,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,WAAW,mBAAmB,KAAK;AACzC,SAAO,WAAW,OAAO,QAAQ,MAAM,KAAK,KAAK;AACnD;AAkBO,SAAS,wBAAwB,OAA+C;AACrF,MAAI,CAAC,MAAO,QAAO;AACnB,aAAW,SAAS,MAAM,MAAM,GAAG,GAAG;AACpC,UAAM,WAAW,cAAc,gBAAgB,KAAK,CAAC;AACrD,QAAI,SAAU,QAAO,OAAO,QAAQ,MAAM,KAAK;AAAA,EACjD;AACA,SAAO;AACT;","names":[]}
@@ -7,8 +7,9 @@ import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
7
7
  * faces for the theme / DESIGN.md registry. Importing it just to get the CJK face
8
8
  * would drag those build-time Google downloads into every app — and this repo has
9
9
  * a known trap where `next/font/google` fails outright in a network-sandboxed dev
10
- * server. This file imports `next/font/local` ONLY: the woff2 files ship in the
11
- * package, so it works offline, in CI, and in the sandbox. `./next` re-exports it,
10
+ * server. This file imports `next/font/local` ONLY: the woff2 files live in the
11
+ * workspace `generated/` directory (not the npm tarball), so first-party apps
12
+ * work offline, in CI, and in the sandbox. `./next` re-exports it,
12
13
  * so an app already applying `fontRegistryClassName` still only needs one import.
13
14
  *
14
15
  * WHY SELF-HOSTED AT ALL: Geist has no CJK coverage, so without this every Chinese
@@ -17,37 +18,29 @@ import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
17
18
  * surface here (see docs/microcopy/), so the face is pinned rather than left to
18
19
  * the OS.
19
20
  *
20
- * The files are built by `pnpm --filter @nebutra/fonts subset:cjk`; the literal
21
- * `src` list below mirrors VIVO_SANS_CN_SOURCES in ../generated/index.ts (a drift
22
- * test in ./next-cjk.test.ts asserts they agree). It is spelled out rather than
23
- * spread because next/font is a compile-time transform — SWC statically analyses
24
- * this call, so the options object cannot be computed.
25
- *
26
- * FONT ATTRIBUTION (vivo Sans 字体知识产权许可协议 clause 2.1):
27
- * 您应在软件中特别注明使用了vivo Sans 字体 — this software uses the vivo Sans
28
- * typeface. See ../vendor/vivo-sans/LICENCE-vivo-Sans.txt and the package README.
21
+ * The files are built by `pnpm --filter @nebutra/fonts subset:cjk` from
22
+ * Noto Sans SC (SIL OFL) and live in the workspace `generated/` directory.
23
+ * The literal `src` list below mirrors NOTO_SANS_SC_SOURCES in
24
+ * ../generated/index.ts (a drift test in ./next-cjk.test.ts asserts they agree).
25
+ * It is spelled out rather than spread because next/font is a compile-time
26
+ * transform — SWC statically analyses this call, so the options object cannot
27
+ * be computed.
29
28
  */
30
29
  /**
31
- * vivo Sans SC — 400 / 500 / 600 / 700 static subsets.
30
+ * Noto Sans SC — 400 / 500 / 600 / 700 static subsets.
32
31
  *
33
- * - `preload: false` on purpose. Each weight is ~490 KB; preloading them on every
34
- * route would tax Latin-only pages for nothing. The browser fetches a weight
35
- * only when a glyph in the `unicode-range` below actually renders.
32
+ * - `preload: false` on purpose. Each weight is hundreds of KB; preloading them
33
+ * on every route would tax Latin-only pages for nothing. The browser fetches
34
+ * a weight only when a glyph in the `unicode-range` below actually renders.
36
35
  * - `declarations` carries that `unicode-range` (CJK blocks only — no ASCII, no
37
36
  * Latin, no general punctuation), so a Latin-only page can never trigger a CJK
38
- * download even if a font stack somewhere is written the wrong way round. Curly
39
- * quotes, the em dash and the ellipsis are deliberately left to Geist: they are
40
- * the codepoints Latin and Chinese copy share.
37
+ * download even if a font stack somewhere is written the wrong way round.
41
38
  * - `adjustFontFallback: false` — next/font's metric-matched fallback is derived
42
- * from Arial, which is meaningless for a Han face and would add a size-adjusted
43
- * ghost face into the same family.
44
- * - 700 is a real Bold subset (not synthetic). Without it, CSS weight matching
45
- * collapses 700 → 600 and the mixed-script ladder flattens against Geist.
46
- * `font-synthesis: none` still forbids faux bold for any weight we do not ship.
39
+ * from Arial, which is meaningless for a Han face.
47
40
  */
48
- declare const vivoSansCn: next_dist_compiled__next_font.NextFontWithVariable;
41
+ declare const notoSansSc: next_dist_compiled__next_font.NextFontWithVariable;
49
42
  /**
50
- * Apply to <html> next to the Geist loaders so `--font-vivo-sans-sc` exists:
43
+ * Apply to <html> next to the Geist loaders so `--font-noto-sans-sc` exists:
51
44
  *
52
45
  * className={`${GeistSans.variable} ${GeistMono.variable} ${cjkFontClassName}`}
53
46
  *
@@ -57,4 +50,4 @@ declare const vivoSansCn: next_dist_compiled__next_font.NextFontWithVariable;
57
50
  */
58
51
  declare const cjkFontClassName: string;
59
52
 
60
- export { cjkFontClassName, vivoSansCn };
53
+ export { cjkFontClassName, notoSansSc };
package/dist/next-cjk.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  cjkFontClassName,
3
- vivoSansCn
4
- } from "./chunk-MI5GQA6D.js";
3
+ notoSansSc
4
+ } from "./chunk-GRE7GS6W.js";
5
5
  export {
6
6
  cjkFontClassName,
7
- vivoSansCn
7
+ notoSansSc
8
8
  };
9
9
  //# sourceMappingURL=next-cjk.js.map
package/dist/next.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
2
- export { cjkFontClassName, vivoSansCn } from './next-cjk.js';
2
+ export { cjkFontClassName, notoSansSc } from './next-cjk.js';
3
3
 
4
4
  /** All registry faces, in declaration order. */
5
- declare const FONT_REGISTRY_FACES: readonly [next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable];
5
+ declare const FONT_REGISTRY_FACES: readonly [next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable, next_dist_compiled__next_font.NextFontWithVariable];
6
6
  /**
7
7
  * Space-joined `.variable` classNames for every registry face. Apply to <html>
8
8
  * so all `--font-*` registry variables are defined (font files lazy-load on
package/dist/next.js CHANGED
@@ -1,14 +1,16 @@
1
1
  import {
2
2
  cjkFontClassName,
3
- vivoSansCn
4
- } from "./chunk-MI5GQA6D.js";
3
+ notoSansSc
4
+ } from "./chunk-GRE7GS6W.js";
5
5
 
6
6
  // src/next.ts
7
7
  import {
8
8
  DM_Sans,
9
9
  Figtree,
10
10
  Fira_Code,
11
+ Fraunces,
11
12
  Inter,
13
+ Inter_Tight,
12
14
  JetBrains_Mono,
13
15
  Lexend,
14
16
  Manrope,
@@ -19,10 +21,16 @@ import {
19
21
  Roboto_Mono,
20
22
  Sora,
21
23
  Source_Code_Pro,
24
+ Source_Serif_4,
22
25
  Space_Grotesk,
23
26
  Work_Sans
24
27
  } from "next/font/google";
25
28
  var inter = Inter({ subsets: ["latin"], display: "swap", variable: "--font-inter" });
29
+ var interTight = Inter_Tight({
30
+ subsets: ["latin"],
31
+ display: "swap",
32
+ variable: "--font-reg-inter-tight"
33
+ });
26
34
  var spaceGrotesk = Space_Grotesk({
27
35
  subsets: ["latin"],
28
36
  display: "swap",
@@ -33,6 +41,11 @@ var playfairDisplay = Playfair_Display({
33
41
  display: "swap",
34
42
  variable: "--font-playfair-display"
35
43
  });
44
+ var fraunces = Fraunces({
45
+ subsets: ["latin"],
46
+ display: "swap",
47
+ variable: "--font-reg-fraunces"
48
+ });
36
49
  var jetbrainsMono = JetBrains_Mono({
37
50
  subsets: ["latin"],
38
51
  display: "swap",
@@ -69,6 +82,11 @@ var robotoMono = Roboto_Mono({
69
82
  display: "swap",
70
83
  variable: "--font-reg-roboto-mono"
71
84
  });
85
+ var sourceSerif4 = Source_Serif_4({
86
+ subsets: ["latin"],
87
+ display: "swap",
88
+ variable: "--font-reg-source-serif-4"
89
+ });
72
90
  var sourceCodePro = Source_Code_Pro({
73
91
  subsets: ["latin"],
74
92
  display: "swap",
@@ -76,8 +94,11 @@ var sourceCodePro = Source_Code_Pro({
76
94
  });
77
95
  var FONT_REGISTRY_FACES = [
78
96
  inter,
97
+ interTight,
79
98
  spaceGrotesk,
80
99
  playfairDisplay,
100
+ sourceSerif4,
101
+ fraunces,
81
102
  jetbrainsMono,
82
103
  manrope,
83
104
  sora,
@@ -97,6 +118,6 @@ export {
97
118
  FONT_REGISTRY_FACES,
98
119
  cjkFontClassName,
99
120
  fontRegistryClassName,
100
- vivoSansCn
121
+ notoSansSc
101
122
  };
102
123
  //# sourceMappingURL=next.js.map