@nebutra/fonts 2.0.0 → 4.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.
@@ -1,53 +1,55 @@
1
1
  import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
 
3
4
  /**
4
- * @nebutra/fonts/next/cjk — the self-hosted Simplified-Chinese face (server-only).
5
+ * MiSans @font-face, rendered at request time rather than shipped as CSS.
5
6
  *
6
- * WHY A SEPARATE ENTRY FROM `./next`: that module declares ~16 `next/font/google`
7
- * faces for the theme / DESIGN.md registry. Importing it just to get the CJK face
8
- * would drag those build-time Google downloads into every app — and this repo has
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 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,
13
- * so an app already applying `fontRegistryClassName` still only needs one import.
7
+ * The MiSans licence forbids distributing the font on its own and this
8
+ * repository is public, so the subsets live in the deployment's public asset
9
+ * bucket and only their keys are committed (../generated/index.ts). A static
10
+ * stylesheet would have to spell out a host, and the host differs per
11
+ * deployment: Nebutra's CDN for Nebutra, the scaffold's own for a template
12
+ * user. publicAssetUrl() resolves it the way it resolves every other public
13
+ * asset — NEXT_PUBLIC_R2_PUBLIC_URL, then R2_PUBLIC_URL, then the brand's cdn
14
+ * origin.
14
15
  *
15
- * WHY SELF-HOSTED AT ALL: Geist has no CJK coverage, so without this every Chinese
16
- * character falls back to whatever the OS supplies — PingFang on macOS, Microsoft
17
- * YaHei on Windows, something else on Android. Chinese copy is a first-class
18
- * surface here (see docs/microcopy/), so the face is pinned rather than left to
19
- * the OS.
20
- *
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.
16
+ * Before the subsets have been uploaded (a fresh scaffold, `pnpm subset:cjk
17
+ * --upload` not yet run) the requests 404 and the token stacks fall through to
18
+ * PingFang / YaHei. That is the intended degraded state, not an error.
28
19
  */
20
+ /** One @font-face per weight, CJK-only unicode-range, `swap` so text is never invisible. */
21
+ declare function misansFontFaceCss(origin?: string): string;
22
+ interface CjkFontFaceProps {
23
+ /** Asset origin override; defaults to the publicAssetUrl() resolution. */
24
+ origin?: string;
25
+ /**
26
+ * CSP nonce, for apps whose style-src allows inline styles only by nonce
27
+ * (apps/web). Without it the whole @font-face block is refused. The page's
28
+ * font-src must also allow publicAssetOrigin().
29
+ */
30
+ nonce?: string;
31
+ }
29
32
  /**
30
- * Noto Sans SC — 400 / 500 / 600 / 700 static subsets.
31
- *
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.
35
- * - `declarations` carries that `unicode-range` (CJK blocks only — no ASCII, no
36
- * Latin, no general punctuation), so a Latin-only page can never trigger a CJK
37
- * download even if a font stack somewhere is written the wrong way round.
38
- * - `adjustFontFallback: false` — next/font's metric-matched fallback is derived
39
- * from Arial, which is meaningless for a Han face.
33
+ * Render once in each root layout, next to `cjkFontClassName` on <html>.
34
+ * React 19 hoists a `<style>` carrying `href` + `precedence` into <head> and
35
+ * dedupes it by `href`, so rendering it twice costs nothing.
36
+ */
37
+ declare function CjkFontFace({ origin, nonce }: CjkFontFaceProps): react_jsx_runtime.JSX.Element;
38
+
39
+ /**
40
+ * DM Sans — one variable file (opsz 9–40, wght 100–1000), Latin subset, 67KB.
41
+ * Preloaded: headings render above the fold on most pages.
40
42
  */
41
- declare const notoSansSc: next_dist_compiled__next_font.NextFontWithVariable;
43
+ declare const dmSans: next_dist_compiled__next_font.NextFontWithVariable;
42
44
  /**
43
- * Apply to <html> next to the Geist loaders so `--font-noto-sans-sc` exists:
45
+ * Apply to <html> next to the Geist loaders so `--font-dm-sans` exists:
44
46
  *
45
47
  * className={`${GeistSans.variable} ${GeistMono.variable} ${cjkFontClassName}`}
46
48
  *
47
- * The token stacks (`--font-sans` / `--font-cn` / `--font-display` in
48
- * @nebutra/tokens) reference the variable AFTER Geist, so Geist keeps Latin and
49
- * the numerals and only CJK falls through to this face.
49
+ * The name predates DM Sans; it now carries both brand faces so every app that
50
+ * already applies it picks them up without a layout change.
50
51
  */
52
+ declare const brandFontClassName: string;
51
53
  declare const cjkFontClassName: string;
52
54
 
53
- export { cjkFontClassName, notoSansSc };
55
+ export { CjkFontFace, brandFontClassName, cjkFontClassName, dmSans, misansFontFaceCss };
package/dist/next-cjk.js CHANGED
@@ -1,9 +1,16 @@
1
1
  import {
2
+ CjkFontFace,
3
+ brandFontClassName,
2
4
  cjkFontClassName,
3
- notoSansSc
4
- } from "./chunk-GRE7GS6W.js";
5
+ dmSans,
6
+ misansFontFaceCss
7
+ } from "./chunk-A4PPXTH5.js";
8
+ import "./chunk-FUPJK5RT.js";
5
9
  export {
10
+ CjkFontFace,
11
+ brandFontClassName,
6
12
  cjkFontClassName,
7
- notoSansSc
13
+ dmSans,
14
+ misansFontFaceCss
8
15
  };
9
16
  //# sourceMappingURL=next-cjk.js.map
package/dist/next.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
2
- export { cjkFontClassName, notoSansSc } from './next-cjk.js';
2
+ export { CjkFontFace, brandFontClassName, cjkFontClassName, dmSans } from './next-cjk.js';
3
+ import 'react/jsx-runtime';
3
4
 
4
5
  /** All registry faces, in declaration order. */
5
6
  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];
package/dist/next.js CHANGED
@@ -1,95 +1,242 @@
1
1
  import {
2
+ CjkFontFace,
3
+ brandFontClassName,
2
4
  cjkFontClassName,
3
- notoSansSc
4
- } from "./chunk-GRE7GS6W.js";
5
+ dmSans
6
+ } from "./chunk-A4PPXTH5.js";
7
+ import "./chunk-FUPJK5RT.js";
5
8
 
6
9
  // src/next.ts
7
- import {
8
- DM_Sans,
9
- Figtree,
10
- Fira_Code,
11
- Fraunces,
12
- Inter,
13
- Inter_Tight,
14
- JetBrains_Mono,
15
- Lexend,
16
- Manrope,
17
- Montserrat,
18
- Outfit,
19
- Playfair_Display,
20
- Plus_Jakarta_Sans,
21
- Roboto_Mono,
22
- Sora,
23
- Source_Code_Pro,
24
- Source_Serif_4,
25
- Space_Grotesk,
26
- Work_Sans
27
- } from "next/font/google";
28
- var inter = Inter({ subsets: ["latin"], display: "swap", variable: "--font-inter" });
29
- var interTight = Inter_Tight({
30
- subsets: ["latin"],
10
+ import localFont from "next/font/local";
11
+ var inter = localFont({
12
+ src: [
13
+ {
14
+ path: "../node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2",
15
+ weight: "100 900",
16
+ style: "normal"
17
+ }
18
+ ],
19
+ display: "swap",
20
+ declarations: [{ prop: "font-family", value: "'Inter'" }],
21
+ variable: "--font-inter"
22
+ });
23
+ var interTight = localFont({
24
+ src: [
25
+ {
26
+ path: "../node_modules/@fontsource-variable/inter-tight/files/inter-tight-latin-wght-normal.woff2",
27
+ weight: "100 900",
28
+ style: "normal"
29
+ }
30
+ ],
31
31
  display: "swap",
32
+ declarations: [{ prop: "font-family", value: "'Inter Tight'" }],
32
33
  variable: "--font-reg-inter-tight"
33
34
  });
34
- var spaceGrotesk = Space_Grotesk({
35
- subsets: ["latin"],
35
+ var spaceGrotesk = localFont({
36
+ src: [
37
+ {
38
+ path: "../node_modules/@fontsource-variable/space-grotesk/files/space-grotesk-latin-wght-normal.woff2",
39
+ weight: "300 700",
40
+ style: "normal"
41
+ }
42
+ ],
36
43
  display: "swap",
44
+ declarations: [{ prop: "font-family", value: "'Space Grotesk'" }],
37
45
  variable: "--font-space-grotesk"
38
46
  });
39
- var playfairDisplay = Playfair_Display({
40
- subsets: ["latin"],
47
+ var playfairDisplay = localFont({
48
+ src: [
49
+ {
50
+ path: "../node_modules/@fontsource-variable/playfair-display/files/playfair-display-latin-wght-normal.woff2",
51
+ weight: "400 900",
52
+ style: "normal"
53
+ }
54
+ ],
41
55
  display: "swap",
56
+ declarations: [{ prop: "font-family", value: "'Playfair Display'" }],
57
+ adjustFontFallback: "Times New Roman",
42
58
  variable: "--font-playfair-display"
43
59
  });
44
- var fraunces = Fraunces({
45
- subsets: ["latin"],
60
+ var fraunces = localFont({
61
+ src: [
62
+ {
63
+ path: "../node_modules/@fontsource-variable/fraunces/files/fraunces-latin-wght-normal.woff2",
64
+ weight: "100 900",
65
+ style: "normal"
66
+ }
67
+ ],
46
68
  display: "swap",
69
+ declarations: [{ prop: "font-family", value: "'Fraunces'" }],
70
+ adjustFontFallback: "Times New Roman",
47
71
  variable: "--font-reg-fraunces"
48
72
  });
49
- var jetbrainsMono = JetBrains_Mono({
50
- subsets: ["latin"],
73
+ var jetbrainsMono = localFont({
74
+ src: [
75
+ {
76
+ path: "../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2",
77
+ weight: "100 800",
78
+ style: "normal"
79
+ }
80
+ ],
51
81
  display: "swap",
82
+ declarations: [{ prop: "font-family", value: "'JetBrains Mono'" }],
52
83
  variable: "--font-jetbrains-mono"
53
84
  });
54
- var manrope = Manrope({ subsets: ["latin"], display: "swap", variable: "--font-reg-manrope" });
55
- var sora = Sora({ subsets: ["latin"], display: "swap", variable: "--font-reg-sora" });
56
- var workSans = Work_Sans({
57
- subsets: ["latin"],
85
+ var manrope = localFont({
86
+ src: [
87
+ {
88
+ path: "../node_modules/@fontsource-variable/manrope/files/manrope-latin-wght-normal.woff2",
89
+ weight: "200 800",
90
+ style: "normal"
91
+ }
92
+ ],
93
+ display: "swap",
94
+ declarations: [{ prop: "font-family", value: "'Manrope'" }],
95
+ variable: "--font-reg-manrope"
96
+ });
97
+ var sora = localFont({
98
+ src: [
99
+ {
100
+ path: "../node_modules/@fontsource-variable/sora/files/sora-latin-wght-normal.woff2",
101
+ weight: "100 800",
102
+ style: "normal"
103
+ }
104
+ ],
58
105
  display: "swap",
106
+ declarations: [{ prop: "font-family", value: "'Sora'" }],
107
+ variable: "--font-reg-sora"
108
+ });
109
+ var workSans = localFont({
110
+ src: [
111
+ {
112
+ path: "../node_modules/@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2",
113
+ weight: "100 900",
114
+ style: "normal"
115
+ }
116
+ ],
117
+ display: "swap",
118
+ declarations: [{ prop: "font-family", value: "'Work Sans'" }],
59
119
  variable: "--font-reg-work-sans"
60
120
  });
61
- var dmSans = DM_Sans({ subsets: ["latin"], display: "swap", variable: "--font-reg-dm-sans" });
62
- var plusJakartaSans = Plus_Jakarta_Sans({
63
- subsets: ["latin"],
121
+ var dmSans2 = localFont({
122
+ src: [
123
+ {
124
+ path: "../node_modules/@fontsource-variable/dm-sans/files/dm-sans-latin-wght-normal.woff2",
125
+ weight: "100 1000",
126
+ style: "normal"
127
+ }
128
+ ],
129
+ display: "swap",
130
+ declarations: [{ prop: "font-family", value: "'DM Sans'" }],
131
+ variable: "--font-reg-dm-sans"
132
+ });
133
+ var plusJakartaSans = localFont({
134
+ src: [
135
+ {
136
+ path: "../node_modules/@fontsource-variable/plus-jakarta-sans/files/plus-jakarta-sans-latin-wght-normal.woff2",
137
+ weight: "200 800",
138
+ style: "normal"
139
+ }
140
+ ],
64
141
  display: "swap",
142
+ declarations: [{ prop: "font-family", value: "'Plus Jakarta Sans'" }],
65
143
  variable: "--font-reg-plus-jakarta-sans"
66
144
  });
67
- var outfit = Outfit({ subsets: ["latin"], display: "swap", variable: "--font-reg-outfit" });
68
- var figtree = Figtree({ subsets: ["latin"], display: "swap", variable: "--font-reg-figtree" });
69
- var montserrat = Montserrat({
70
- subsets: ["latin"],
145
+ var outfit = localFont({
146
+ src: [
147
+ {
148
+ path: "../node_modules/@fontsource-variable/outfit/files/outfit-latin-wght-normal.woff2",
149
+ weight: "100 900",
150
+ style: "normal"
151
+ }
152
+ ],
71
153
  display: "swap",
154
+ declarations: [{ prop: "font-family", value: "'Outfit'" }],
155
+ variable: "--font-reg-outfit"
156
+ });
157
+ var figtree = localFont({
158
+ src: [
159
+ {
160
+ path: "../node_modules/@fontsource-variable/figtree/files/figtree-latin-wght-normal.woff2",
161
+ weight: "300 900",
162
+ style: "normal"
163
+ }
164
+ ],
165
+ display: "swap",
166
+ declarations: [{ prop: "font-family", value: "'Figtree'" }],
167
+ variable: "--font-reg-figtree"
168
+ });
169
+ var montserrat = localFont({
170
+ src: [
171
+ {
172
+ path: "../node_modules/@fontsource-variable/montserrat/files/montserrat-latin-wght-normal.woff2",
173
+ weight: "100 900",
174
+ style: "normal"
175
+ }
176
+ ],
177
+ display: "swap",
178
+ declarations: [{ prop: "font-family", value: "'Montserrat'" }],
72
179
  variable: "--font-reg-montserrat"
73
180
  });
74
- var lexend = Lexend({ subsets: ["latin"], display: "swap", variable: "--font-reg-lexend" });
75
- var firaCode = Fira_Code({
76
- subsets: ["latin"],
181
+ var lexend = localFont({
182
+ src: [
183
+ {
184
+ path: "../node_modules/@fontsource-variable/lexend/files/lexend-latin-wght-normal.woff2",
185
+ weight: "100 900",
186
+ style: "normal"
187
+ }
188
+ ],
77
189
  display: "swap",
190
+ declarations: [{ prop: "font-family", value: "'Lexend'" }],
191
+ variable: "--font-reg-lexend"
192
+ });
193
+ var firaCode = localFont({
194
+ src: [
195
+ {
196
+ path: "../node_modules/@fontsource-variable/fira-code/files/fira-code-latin-wght-normal.woff2",
197
+ weight: "300 700",
198
+ style: "normal"
199
+ }
200
+ ],
201
+ display: "swap",
202
+ declarations: [{ prop: "font-family", value: "'Fira Code'" }],
78
203
  variable: "--font-reg-fira-code"
79
204
  });
80
- var robotoMono = Roboto_Mono({
81
- subsets: ["latin"],
205
+ var robotoMono = localFont({
206
+ src: [
207
+ {
208
+ path: "../node_modules/@fontsource-variable/roboto-mono/files/roboto-mono-latin-wght-normal.woff2",
209
+ weight: "100 700",
210
+ style: "normal"
211
+ }
212
+ ],
82
213
  display: "swap",
214
+ declarations: [{ prop: "font-family", value: "'Roboto Mono'" }],
83
215
  variable: "--font-reg-roboto-mono"
84
216
  });
85
- var sourceSerif4 = Source_Serif_4({
86
- subsets: ["latin"],
217
+ var sourceSerif4 = localFont({
218
+ src: [
219
+ {
220
+ path: "../node_modules/@fontsource-variable/source-serif-4/files/source-serif-4-latin-wght-normal.woff2",
221
+ weight: "200 900",
222
+ style: "normal"
223
+ }
224
+ ],
87
225
  display: "swap",
226
+ declarations: [{ prop: "font-family", value: "'Source Serif 4'" }],
227
+ adjustFontFallback: "Times New Roman",
88
228
  variable: "--font-reg-source-serif-4"
89
229
  });
90
- var sourceCodePro = Source_Code_Pro({
91
- subsets: ["latin"],
230
+ var sourceCodePro = localFont({
231
+ src: [
232
+ {
233
+ path: "../node_modules/@fontsource-variable/source-code-pro/files/source-code-pro-latin-wght-normal.woff2",
234
+ weight: "200 900",
235
+ style: "normal"
236
+ }
237
+ ],
92
238
  display: "swap",
239
+ declarations: [{ prop: "font-family", value: "'Source Code Pro'" }],
93
240
  variable: "--font-reg-source-code-pro"
94
241
  });
95
242
  var FONT_REGISTRY_FACES = [
@@ -103,7 +250,7 @@ var FONT_REGISTRY_FACES = [
103
250
  manrope,
104
251
  sora,
105
252
  workSans,
106
- dmSans,
253
+ dmSans2,
107
254
  plusJakartaSans,
108
255
  outfit,
109
256
  figtree,
@@ -115,9 +262,11 @@ var FONT_REGISTRY_FACES = [
115
262
  ];
116
263
  var fontRegistryClassName = FONT_REGISTRY_FACES.map((face) => face.variable).join(" ");
117
264
  export {
265
+ CjkFontFace,
118
266
  FONT_REGISTRY_FACES,
267
+ brandFontClassName,
119
268
  cjkFontClassName,
120
- fontRegistryClassName,
121
- notoSansSc
269
+ dmSans,
270
+ fontRegistryClassName
122
271
  };
123
272
  //# sourceMappingURL=next.js.map
package/dist/next.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/next.ts"],"sourcesContent":["/**\n * @nebutra/fonts/next — build-time self-hosted OSS font faces (server-only).\n *\n * Each face is loaded via next/font/google, which downloads the font AT BUILD\n * TIME and self-hosts it from the app's own origin — there are ZERO runtime\n * requests to Google (no IP leak / GDPR concern, no third-party runtime\n * dependency). Each face exposes a CSS variable; the browser only fetches a\n * given font file when an element actually uses that variable, so declaring the\n * whole registry is cheap.\n *\n * Apply `fontRegistryClassName` to <html> so the `--font-*` variables exist;\n * the appearance layer then prepends the matching `var(--font-*)` (see the\n * client-safe map in `@nebutra/fonts`) when a theme / DESIGN.md font matches.\n *\n * All declarations use a literal options object — next/font statically analyses\n * the call, so the config must NOT be computed. Variable fonts omit `weight`.\n * Keep the `variable` names in sync with FONT_REGISTRY in `../index.ts`.\n *\n * The self-hosted Simplified-Chinese face lives in `./next-cjk` (next/font/local,\n * no Google fetch) and is re-exported here for discoverability. It is NOT folded\n * into `fontRegistryClassName`: the CJK face is core typography, not an optional\n * theme face, and every app wires it the same way — `${cjkFontClassName}` on\n * <html> beside the Geist loaders. Apps that only need the CJK face should import\n * `@nebutra/fonts/next/cjk` directly so they don't pull in the Google faces below.\n */\n\nimport {\n DM_Sans,\n Figtree,\n Fira_Code,\n Fraunces,\n Inter,\n Inter_Tight,\n JetBrains_Mono,\n Lexend,\n Manrope,\n Montserrat,\n Outfit,\n Playfair_Display,\n Plus_Jakarta_Sans,\n Roboto_Mono,\n Sora,\n Source_Code_Pro,\n Source_Serif_4,\n Space_Grotesk,\n Work_Sans,\n} from \"next/font/google\";\n\nexport { cjkFontClassName, notoSansSc } from \"./next-cjk\";\n\nconst inter = Inter({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-inter\" });\nconst interTight = Inter_Tight({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-inter-tight\",\n});\nconst spaceGrotesk = Space_Grotesk({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-space-grotesk\",\n});\nconst playfairDisplay = Playfair_Display({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-playfair-display\",\n});\nconst fraunces = Fraunces({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-fraunces\",\n});\nconst jetbrainsMono = JetBrains_Mono({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-jetbrains-mono\",\n});\nconst manrope = Manrope({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-manrope\" });\nconst sora = Sora({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-sora\" });\nconst workSans = Work_Sans({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-work-sans\",\n});\nconst dmSans = DM_Sans({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-dm-sans\" });\nconst plusJakartaSans = Plus_Jakarta_Sans({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-plus-jakarta-sans\",\n});\nconst outfit = Outfit({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-outfit\" });\nconst figtree = Figtree({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-figtree\" });\nconst montserrat = Montserrat({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-montserrat\",\n});\nconst lexend = Lexend({ subsets: [\"latin\"], display: \"swap\", variable: \"--font-reg-lexend\" });\nconst firaCode = Fira_Code({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-fira-code\",\n});\nconst robotoMono = Roboto_Mono({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-roboto-mono\",\n});\nconst sourceSerif4 = Source_Serif_4({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-source-serif-4\",\n});\nconst sourceCodePro = Source_Code_Pro({\n subsets: [\"latin\"],\n display: \"swap\",\n variable: \"--font-reg-source-code-pro\",\n});\n\n/** All registry faces, in declaration order. */\nexport const FONT_REGISTRY_FACES = [\n inter,\n interTight,\n spaceGrotesk,\n playfairDisplay,\n sourceSerif4,\n fraunces,\n jetbrainsMono,\n manrope,\n sora,\n workSans,\n dmSans,\n plusJakartaSans,\n outfit,\n figtree,\n montserrat,\n lexend,\n firaCode,\n robotoMono,\n sourceCodePro,\n] as const;\n\n/**\n * Space-joined `.variable` classNames for every registry face. Apply to <html>\n * so all `--font-*` registry variables are defined (font files lazy-load on\n * first use). Combine with the app's own Geist faces.\n */\nexport const fontRegistryClassName = FONT_REGISTRY_FACES.map((face) => face.variable).join(\" \");\n"],"mappings":";;;;;;AA0BA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,IAAM,QAAQ,MAAM,EAAE,SAAS,CAAC,OAAO,GAAG,SAAS,QAAQ,UAAU,eAAe,CAAC;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;AAAA,EACT,UAAU;AACZ,CAAC;AACD,IAAM,SAAS,OAAO,EAAE,SAAS,CAAC,OAAO,GAAG,SAAS,QAAQ,UAAU,oBAAoB,CAAC;AAC5F,IAAM,WAAW,UAAU;AAAA,EACzB,SAAS,CAAC,OAAO;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;AACD,IAAM,aAAa,YAAY;AAAA,EAC7B,SAAS,CAAC,OAAO;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;AACD,IAAM,eAAe,eAAe;AAAA,EAClC,SAAS,CAAC,OAAO;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;AACD,IAAM,gBAAgB,gBAAgB;AAAA,EACpC,SAAS,CAAC,OAAO;AAAA,EACjB,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;AAGM,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOO,IAAM,wBAAwB,oBAAoB,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,KAAK,GAAG;","names":[]}
1
+ {"version":3,"sources":["../src/next.ts"],"sourcesContent":["/**\n * @nebutra/fonts/next — the theme / DESIGN.md registry faces (server-only).\n *\n * Every face is loaded through `next/font/local` from an `@fontsource-variable/*`\n * package that arrives with `pnpm install` — the build and the dev server make\n * NO request to fonts.googleapis.com / fonts.gstatic.com. That is the point:\n * with `next/font/google`, a machine that cannot reach Google (mainland China,\n * a corporate proxy, a plane) failed `next build` outright and answered 500 from\n * the Turbopack dev server (\"Can't resolve '@vercel/turbopack-next/internal/font/google/font'\"),\n * so a scaffold's preview site was dead on arrival. npm packages are mirrored\n * everywhere (npmmirror in China); Google Fonts is not.\n *\n * The files are the same Google Fonts builds (same font version, same `wght`\n * axis, identical shaping — checked glyph by glyph against what\n * next/font/google downloaded): Fontsource republishes them under the SIL OFL\n * 1.1, which permits redistribution. Each face is the Latin subset of the\n * upright variable font, the subset the registry declared (`subsets: [\"latin\"]`)\n * and the only one it preloaded. Weight ranges are the ones Google served.\n * Serif faces take Times New Roman as the metric-matched fallback, as\n * next/font/google did; the rest take Arial. Each face keeps its Google family\n * name through `declarations` — without it next/font/local names the family\n * after the const, and this file's `dmSans` collided with the brand `dmSans` in\n * ./next-cjk: two @font-face rules under one family, and the heading face\n * rendered from the wrong file.\n *\n * Each face exposes a CSS variable; the browser only fetches a given file when\n * an element resolves to that variable, so declaring the whole registry is\n * cheap. Apply `fontRegistryClassName` to <html> so the `--font-*` variables\n * exist; the appearance layer then prepends the matching `var(--font-*)` (see\n * the client-safe map in `@nebutra/fonts`) when a theme / DESIGN.md font\n * matches. Keep the `variable` names in sync with FONT_REGISTRY in `../index.ts`.\n *\n * next/font is a compile-time transform: SWC statically analyses each call, so\n * every options object is a literal and every `path` a string literal. The path\n * is relative to this file and goes through the package's own node_modules\n * (pnpm links every dependency there), so it resolves the same from `src/` and\n * `dist/`. `scripts/lint-no-google-fonts.mjs` keeps `next/font/google` out of\n * template-shipped code.\n *\n * The brand faces live in `./next-cjk` — DM Sans (next/font/local) and\n * <CjkFontFace /> for the CDN-hosted MiSans — and are re-exported here for\n * discoverability. They are NOT folded into `fontRegistryClassName`: they are\n * core typography, not optional theme faces, and every app wires them the same\n * way — `${cjkFontClassName}` on <html> beside the Geist loaders and\n * <CjkFontFace /> in the root layout. Apps that only need them should import\n * `@nebutra/fonts/next/cjk` directly so they don't pull in the registry below.\n */\n\nimport localFont from \"next/font/local\";\n\nexport { brandFontClassName, CjkFontFace, cjkFontClassName, dmSans } from \"./next-cjk\";\n\nconst inter = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Inter'\" }],\n variable: \"--font-inter\",\n});\nconst interTight = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/inter-tight/files/inter-tight-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Inter Tight'\" }],\n variable: \"--font-reg-inter-tight\",\n});\nconst spaceGrotesk = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/space-grotesk/files/space-grotesk-latin-wght-normal.woff2\",\n weight: \"300 700\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Space Grotesk'\" }],\n variable: \"--font-space-grotesk\",\n});\nconst playfairDisplay = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/playfair-display/files/playfair-display-latin-wght-normal.woff2\",\n weight: \"400 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Playfair Display'\" }],\n adjustFontFallback: \"Times New Roman\",\n variable: \"--font-playfair-display\",\n});\nconst fraunces = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/fraunces/files/fraunces-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Fraunces'\" }],\n adjustFontFallback: \"Times New Roman\",\n variable: \"--font-reg-fraunces\",\n});\nconst jetbrainsMono = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2\",\n weight: \"100 800\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'JetBrains Mono'\" }],\n variable: \"--font-jetbrains-mono\",\n});\nconst manrope = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/manrope/files/manrope-latin-wght-normal.woff2\",\n weight: \"200 800\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Manrope'\" }],\n variable: \"--font-reg-manrope\",\n});\nconst sora = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/sora/files/sora-latin-wght-normal.woff2\",\n weight: \"100 800\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Sora'\" }],\n variable: \"--font-reg-sora\",\n});\nconst workSans = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Work Sans'\" }],\n variable: \"--font-reg-work-sans\",\n});\nconst dmSans = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/dm-sans/files/dm-sans-latin-wght-normal.woff2\",\n weight: \"100 1000\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'DM Sans'\" }],\n variable: \"--font-reg-dm-sans\",\n});\nconst plusJakartaSans = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/plus-jakarta-sans/files/plus-jakarta-sans-latin-wght-normal.woff2\",\n weight: \"200 800\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Plus Jakarta Sans'\" }],\n variable: \"--font-reg-plus-jakarta-sans\",\n});\nconst outfit = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/outfit/files/outfit-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Outfit'\" }],\n variable: \"--font-reg-outfit\",\n});\nconst figtree = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/figtree/files/figtree-latin-wght-normal.woff2\",\n weight: \"300 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Figtree'\" }],\n variable: \"--font-reg-figtree\",\n});\nconst montserrat = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/montserrat/files/montserrat-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Montserrat'\" }],\n variable: \"--font-reg-montserrat\",\n});\nconst lexend = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/lexend/files/lexend-latin-wght-normal.woff2\",\n weight: \"100 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Lexend'\" }],\n variable: \"--font-reg-lexend\",\n});\nconst firaCode = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/fira-code/files/fira-code-latin-wght-normal.woff2\",\n weight: \"300 700\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Fira Code'\" }],\n variable: \"--font-reg-fira-code\",\n});\nconst robotoMono = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/roboto-mono/files/roboto-mono-latin-wght-normal.woff2\",\n weight: \"100 700\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Roboto Mono'\" }],\n variable: \"--font-reg-roboto-mono\",\n});\nconst sourceSerif4 = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/source-serif-4/files/source-serif-4-latin-wght-normal.woff2\",\n weight: \"200 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Source Serif 4'\" }],\n adjustFontFallback: \"Times New Roman\",\n variable: \"--font-reg-source-serif-4\",\n});\nconst sourceCodePro = localFont({\n src: [\n {\n path: \"../node_modules/@fontsource-variable/source-code-pro/files/source-code-pro-latin-wght-normal.woff2\",\n weight: \"200 900\",\n style: \"normal\",\n },\n ],\n display: \"swap\",\n declarations: [{ prop: \"font-family\", value: \"'Source Code Pro'\" }],\n variable: \"--font-reg-source-code-pro\",\n});\n\n/** All registry faces, in declaration order. */\nexport const FONT_REGISTRY_FACES = [\n inter,\n interTight,\n spaceGrotesk,\n playfairDisplay,\n sourceSerif4,\n fraunces,\n jetbrainsMono,\n manrope,\n sora,\n workSans,\n dmSans,\n plusJakartaSans,\n outfit,\n figtree,\n montserrat,\n lexend,\n firaCode,\n robotoMono,\n sourceCodePro,\n] as const;\n\n/**\n * Space-joined `.variable` classNames for every registry face. Apply to <html>\n * so all `--font-*` registry variables are defined (font files lazy-load on\n * first use). Combine with the app's own Geist faces.\n */\nexport const fontRegistryClassName = FONT_REGISTRY_FACES.map((face) => face.variable).join(\" \");\n"],"mappings":";;;;;;;;;AAgDA,OAAO,eAAe;AAItB,IAAM,QAAQ,UAAU;AAAA,EACtB,KAAK;AAAA,IACH;AAAA,MACE,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS;AAAA,EACT,cAAc,CAAC,EAAE,MAAM,eAAe,OAAO,UAAU,CAAC;AAAA,EACxD,UAAU;AACZ,CAAC;AACD,IAAM,aAAa,UAAU;AAAA,EAC3B,KAAK;AAAA,IACH;AAAA,MACE,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS;AAAA,EACT,cAAc,CAAC,EAAE,MAAM,eAAe,OAAO,gBAAgB,CAAC;AAAA,EAC9D,UAAU;AACZ,CAAC;AACD,IAAM,eAAe,UAAU;AAAA,EAC7B,KAAK;AAAA,IACH;AAAA,MACE,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,SAAS;AAAA,EACT,cAAc,CAAC,EAAE,MAAM,eAAe,OAAO,kBAAkB,CAAC;AAAA,EAChE,UAAU;AACZ,CAAC;AACD,IAAM,kBAAkB,UAA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AAc,CAAC,EAAE,MAAM,eAAe,OAAO,oBAAoB,CAAC;AAAA,EAClE,UAAU;AACZ,CAAC;AAGM,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAOO,IAAM,wBAAwB,oBAAoB,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,KAAK,GAAG;","names":["dmSans"]}
@@ -1,25 +1,28 @@
1
1
  /**
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.
2
+ * GENERATED FILE, DO NOT EDIT.
3
+ * Written by packages/design/fonts/scripts/subset-cjk.mjs.
4
+ *
5
+ * Metadata for the CDN-hosted MiSans subsets. <CjkFontFace /> in
6
+ * ../src/cjk-font-face.tsx turns it into @font-face rules at render time.
7
+ *
8
+ * The registry key is "misans" (see FONT_REGISTRY in ../src/index.ts);
9
+ * the CSS variable is "--font-misans".
6
10
  */
7
11
 
8
- export const NOTO_SANS_SC_VARIABLE = "--font-noto-sans-sc" as const;
12
+ export const MISANS_VARIABLE = "--font-misans" as const;
9
13
 
10
- export const NOTO_SANS_SC_FAMILY = "Noto Sans SC" as const;
14
+ export const MISANS_FAMILY = "MiSans" as const;
11
15
 
12
16
  /** Characters covered per face (catalogs ∪ CJK punctuation ∪ GB2312 level-1). */
13
- export const NOTO_SANS_SC_CHAR_COUNT = 4282 as const;
17
+ export const MISANS_CHAR_COUNT = 4330 as const;
14
18
 
15
19
  /** `unicode-range` of every generated @font-face — CJK only, no Latin. */
16
- export const NOTO_SANS_SC_UNICODE_RANGE =
17
- "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF" as const;
20
+ export const MISANS_UNICODE_RANGE = "U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF" as const;
18
21
 
19
- /** Sources for `next/font/local({ src: [...] })`, paths relative to this file. */
20
- export const NOTO_SANS_SC_SOURCES = [
21
- { path: "./noto-sans-sc-400.woff2", weight: "400", style: "normal", bytes: 1142552 },
22
- { path: "./noto-sans-sc-500.woff2", weight: "500", style: "normal", bytes: 1159128 },
23
- { path: "./noto-sans-sc-600.woff2", weight: "600", style: "normal", bytes: 1162352 },
24
- { path: "./noto-sans-sc-700.woff2", weight: "700", style: "normal", bytes: 1172244 },
22
+ /** Public-asset keys, one per weight (content-hashed names). No host: see publicAssetUrl(). */
23
+ export const MISANS_FILES = [
24
+ { key: "fonts/misans/misans-400.6bf25dfdf3.woff2", weight: "400", bytes: 535408 },
25
+ { key: "fonts/misans/misans-500.442041bb9d.woff2", weight: "500", bytes: 537060 },
26
+ { key: "fonts/misans/misans-600.2590c17c53.woff2", weight: "600", bytes: 540540 },
27
+ { key: "fonts/misans/misans-700.ddd8bf8017.woff2", weight: "700", bytes: 545728 },
25
28
  ] as const;
@@ -1,10 +1,68 @@
1
1
  {
2
2
  "generatedBy": "packages/design/fonts/scripts/subset-cjk.mjs",
3
- "source": "Noto Sans SC (SIL Open Font License 1.1)",
3
+ "inputHash": "9cf44b4c3896fbc5b675202e08ca3cf1ea50512a25e55f17e93249a5616e9894",
4
+ "charsetHash": "47ee971a6d79454b67b4a160bede9bc8f845d7efcf5ed5d88c1abe703bdae6f5",
5
+ "charCount": 4330,
6
+ "charsFromCatalogs": 1663,
7
+ "punctuationFloor": 197,
8
+ "gb2312Level1Floor": 3755,
9
+ "uncoveredBySourceFace": "〄〘〙〚〛〜〟〠〪〭〮〯〫〬〰〱〲〳〴〵〶〷〸〹〺〻〼〽〿︲﹅﹆﹇﹈₩",
10
+ "catalogs": [
11
+ "apps/forge/messages/zh-Hans.json",
12
+ "apps/forge/messages/zh-Hant.json",
13
+ "apps/landing/messages/zh-Hans.json",
14
+ "apps/landing/messages/zh-Hant.json",
15
+ "apps/landing/messages/zh.json",
16
+ "apps/router/messages/zh-Hans.json",
17
+ "apps/router/messages/zh-Hant.json",
18
+ "packages/platform/i18n/locales/zh-Hans.json",
19
+ "packages/platform/i18n/locales/zh-Hant.json",
20
+ "packages/platform/i18n/locales/zh.json"
21
+ ],
22
+ "unicodeRange": [
23
+ "U+3000-303F",
24
+ "U+3400-4DBF",
25
+ "U+4E00-9FFF",
26
+ "U+F900-FAFF",
27
+ "U+FE30-FE4F",
28
+ "U+FF00-FFEF"
29
+ ],
30
+ "subsetOptions": [
31
+ "--flavor=woff2",
32
+ "--layout-features=kern,liga,clig,calt,ccmp,locl,palt,halt,vert,vrt2",
33
+ "--no-subset-tables+=DSIG",
34
+ "--drop-tables+=DSIG",
35
+ "--recalc-bounds",
36
+ "--recalc-average-width"
37
+ ],
4
38
  "faces": [
5
- { "weight": 400, "output": "noto-sans-sc-400.woff2", "bytes": 1142552 },
6
- { "weight": 500, "output": "noto-sans-sc-500.woff2", "bytes": 1159128 },
7
- { "weight": 600, "output": "noto-sans-sc-600.woff2", "bytes": 1162352 },
8
- { "weight": 700, "output": "noto-sans-sc-700.woff2", "bytes": 1172244 }
39
+ {
40
+ "weight": 400,
41
+ "source": "MiSans-Regular.ttf",
42
+ "sourceBytes": 8122324,
43
+ "output": "misans-400.woff2",
44
+ "bytes": 535408
45
+ },
46
+ {
47
+ "weight": 500,
48
+ "source": "MiSans-Medium.ttf",
49
+ "sourceBytes": 8103840,
50
+ "output": "misans-500.woff2",
51
+ "bytes": 537060
52
+ },
53
+ {
54
+ "weight": 600,
55
+ "source": "MiSans-Semibold.ttf",
56
+ "sourceBytes": 8034980,
57
+ "output": "misans-600.woff2",
58
+ "bytes": 540540
59
+ },
60
+ {
61
+ "weight": 700,
62
+ "source": "MiSans-Bold.ttf",
63
+ "sourceBytes": 8009316,
64
+ "output": "misans-700.woff2",
65
+ "bytes": 545728
66
+ }
9
67
  ]
10
68
  }