@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.
- package/CHANGELOG.md +14 -0
- package/NOTICE-FONTS.md +31 -11
- package/README.md +92 -81
- package/dist/chunk-A4PPXTH5.js +38 -0
- package/dist/chunk-A4PPXTH5.js.map +1 -0
- package/dist/chunk-FUPJK5RT.js +20 -0
- package/dist/chunk-FUPJK5RT.js.map +1 -0
- package/dist/generated/index.d.ts +23 -23
- package/dist/generated/index.js +12 -16
- package/dist/generated/index.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/next-cjk.d.ts +40 -38
- package/dist/next-cjk.js +10 -3
- package/dist/next.d.ts +2 -1
- package/dist/next.js +206 -57
- package/dist/next.js.map +1 -1
- package/generated/index.ts +18 -15
- package/generated/subset-manifest.json +63 -5
- package/package.json +31 -5
- package/src/cjk-font-face.tsx +53 -0
- package/src/index.ts +6 -5
- package/src/next-cjk.test.ts +37 -30
- package/src/next-cjk.ts +36 -52
- package/src/next.test.ts +68 -0
- package/src/next.ts +238 -72
- package/vendor/{noto-sans-sc → dm-sans}/OFL.txt +93 -92
- package/vendor/misans/LICENSE.txt +13 -0
- package/dist/chunk-GRE7GS6W.js +0 -27
- package/dist/chunk-GRE7GS6W.js.map +0 -1
- package/generated/noto-sans-sc.css +0 -43
package/src/next.ts
CHANGED
|
@@ -1,118 +1,284 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @nebutra/fonts/next —
|
|
2
|
+
* @nebutra/fonts/next — the theme / DESIGN.md registry faces (server-only).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Every face is loaded through `next/font/local` from an `@fontsource-variable/*`
|
|
5
|
+
* package that arrives with `pnpm install` — the build and the dev server make
|
|
6
|
+
* NO request to fonts.googleapis.com / fonts.gstatic.com. That is the point:
|
|
7
|
+
* with `next/font/google`, a machine that cannot reach Google (mainland China,
|
|
8
|
+
* a corporate proxy, a plane) failed `next build` outright and answered 500 from
|
|
9
|
+
* the Turbopack dev server ("Can't resolve '@vercel/turbopack-next/internal/font/google/font'"),
|
|
10
|
+
* so a scaffold's preview site was dead on arrival. npm packages are mirrored
|
|
11
|
+
* everywhere (npmmirror in China); Google Fonts is not.
|
|
10
12
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
13
|
+
* The files are the same Google Fonts builds (same font version, same `wght`
|
|
14
|
+
* axis, identical shaping — checked glyph by glyph against what
|
|
15
|
+
* next/font/google downloaded): Fontsource republishes them under the SIL OFL
|
|
16
|
+
* 1.1, which permits redistribution. Each face is the Latin subset of the
|
|
17
|
+
* upright variable font, the subset the registry declared (`subsets: ["latin"]`)
|
|
18
|
+
* and the only one it preloaded. Weight ranges are the ones Google served.
|
|
19
|
+
* Serif faces take Times New Roman as the metric-matched fallback, as
|
|
20
|
+
* next/font/google did; the rest take Arial. Each face keeps its Google family
|
|
21
|
+
* name through `declarations` — without it next/font/local names the family
|
|
22
|
+
* after the const, and this file's `dmSans` collided with the brand `dmSans` in
|
|
23
|
+
* ./next-cjk: two @font-face rules under one family, and the heading face
|
|
24
|
+
* rendered from the wrong file.
|
|
14
25
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
26
|
+
* Each face exposes a CSS variable; the browser only fetches a given file when
|
|
27
|
+
* an element resolves to that variable, so declaring the whole registry is
|
|
28
|
+
* cheap. Apply `fontRegistryClassName` to <html> so the `--font-*` variables
|
|
29
|
+
* exist; the appearance layer then prepends the matching `var(--font-*)` (see
|
|
30
|
+
* the client-safe map in `@nebutra/fonts`) when a theme / DESIGN.md font
|
|
31
|
+
* matches. Keep the `variable` names in sync with FONT_REGISTRY in `../index.ts`.
|
|
18
32
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
33
|
+
* next/font is a compile-time transform: SWC statically analyses each call, so
|
|
34
|
+
* every options object is a literal and every `path` a string literal. The path
|
|
35
|
+
* is relative to this file and goes through the package's own node_modules
|
|
36
|
+
* (pnpm links every dependency there), so it resolves the same from `src/` and
|
|
37
|
+
* `dist/`. `scripts/lint-no-google-fonts.mjs` keeps `next/font/google` out of
|
|
38
|
+
* template-shipped code.
|
|
39
|
+
*
|
|
40
|
+
* The brand faces live in `./next-cjk` — DM Sans (next/font/local) and
|
|
41
|
+
* <CjkFontFace /> for the CDN-hosted MiSans — and are re-exported here for
|
|
42
|
+
* discoverability. They are NOT folded into `fontRegistryClassName`: they are
|
|
43
|
+
* core typography, not optional theme faces, and every app wires them the same
|
|
44
|
+
* way — `${cjkFontClassName}` on <html> beside the Geist loaders and
|
|
45
|
+
* <CjkFontFace /> in the root layout. Apps that only need them should import
|
|
46
|
+
* `@nebutra/fonts/next/cjk` directly so they don't pull in the registry below.
|
|
25
47
|
*/
|
|
26
48
|
|
|
27
|
-
import
|
|
28
|
-
DM_Sans,
|
|
29
|
-
Figtree,
|
|
30
|
-
Fira_Code,
|
|
31
|
-
Fraunces,
|
|
32
|
-
Inter,
|
|
33
|
-
Inter_Tight,
|
|
34
|
-
JetBrains_Mono,
|
|
35
|
-
Lexend,
|
|
36
|
-
Manrope,
|
|
37
|
-
Montserrat,
|
|
38
|
-
Outfit,
|
|
39
|
-
Playfair_Display,
|
|
40
|
-
Plus_Jakarta_Sans,
|
|
41
|
-
Roboto_Mono,
|
|
42
|
-
Sora,
|
|
43
|
-
Source_Code_Pro,
|
|
44
|
-
Source_Serif_4,
|
|
45
|
-
Space_Grotesk,
|
|
46
|
-
Work_Sans,
|
|
47
|
-
} from "next/font/google";
|
|
49
|
+
import localFont from "next/font/local";
|
|
48
50
|
|
|
49
|
-
export { cjkFontClassName,
|
|
51
|
+
export { brandFontClassName, CjkFontFace, cjkFontClassName, dmSans } from "./next-cjk";
|
|
50
52
|
|
|
51
|
-
const inter =
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
const inter = localFont({
|
|
54
|
+
src: [
|
|
55
|
+
{
|
|
56
|
+
path: "../node_modules/@fontsource-variable/inter/files/inter-latin-wght-normal.woff2",
|
|
57
|
+
weight: "100 900",
|
|
58
|
+
style: "normal",
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
display: "swap",
|
|
62
|
+
declarations: [{ prop: "font-family", value: "'Inter'" }],
|
|
63
|
+
variable: "--font-inter",
|
|
64
|
+
});
|
|
65
|
+
const interTight = localFont({
|
|
66
|
+
src: [
|
|
67
|
+
{
|
|
68
|
+
path: "../node_modules/@fontsource-variable/inter-tight/files/inter-tight-latin-wght-normal.woff2",
|
|
69
|
+
weight: "100 900",
|
|
70
|
+
style: "normal",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
54
73
|
display: "swap",
|
|
74
|
+
declarations: [{ prop: "font-family", value: "'Inter Tight'" }],
|
|
55
75
|
variable: "--font-reg-inter-tight",
|
|
56
76
|
});
|
|
57
|
-
const spaceGrotesk =
|
|
58
|
-
|
|
77
|
+
const spaceGrotesk = localFont({
|
|
78
|
+
src: [
|
|
79
|
+
{
|
|
80
|
+
path: "../node_modules/@fontsource-variable/space-grotesk/files/space-grotesk-latin-wght-normal.woff2",
|
|
81
|
+
weight: "300 700",
|
|
82
|
+
style: "normal",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
59
85
|
display: "swap",
|
|
86
|
+
declarations: [{ prop: "font-family", value: "'Space Grotesk'" }],
|
|
60
87
|
variable: "--font-space-grotesk",
|
|
61
88
|
});
|
|
62
|
-
const playfairDisplay =
|
|
63
|
-
|
|
89
|
+
const playfairDisplay = localFont({
|
|
90
|
+
src: [
|
|
91
|
+
{
|
|
92
|
+
path: "../node_modules/@fontsource-variable/playfair-display/files/playfair-display-latin-wght-normal.woff2",
|
|
93
|
+
weight: "400 900",
|
|
94
|
+
style: "normal",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
64
97
|
display: "swap",
|
|
98
|
+
declarations: [{ prop: "font-family", value: "'Playfair Display'" }],
|
|
99
|
+
adjustFontFallback: "Times New Roman",
|
|
65
100
|
variable: "--font-playfair-display",
|
|
66
101
|
});
|
|
67
|
-
const fraunces =
|
|
68
|
-
|
|
102
|
+
const fraunces = localFont({
|
|
103
|
+
src: [
|
|
104
|
+
{
|
|
105
|
+
path: "../node_modules/@fontsource-variable/fraunces/files/fraunces-latin-wght-normal.woff2",
|
|
106
|
+
weight: "100 900",
|
|
107
|
+
style: "normal",
|
|
108
|
+
},
|
|
109
|
+
],
|
|
69
110
|
display: "swap",
|
|
111
|
+
declarations: [{ prop: "font-family", value: "'Fraunces'" }],
|
|
112
|
+
adjustFontFallback: "Times New Roman",
|
|
70
113
|
variable: "--font-reg-fraunces",
|
|
71
114
|
});
|
|
72
|
-
const jetbrainsMono =
|
|
73
|
-
|
|
115
|
+
const jetbrainsMono = localFont({
|
|
116
|
+
src: [
|
|
117
|
+
{
|
|
118
|
+
path: "../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-latin-wght-normal.woff2",
|
|
119
|
+
weight: "100 800",
|
|
120
|
+
style: "normal",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
74
123
|
display: "swap",
|
|
124
|
+
declarations: [{ prop: "font-family", value: "'JetBrains Mono'" }],
|
|
75
125
|
variable: "--font-jetbrains-mono",
|
|
76
126
|
});
|
|
77
|
-
const manrope =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
127
|
+
const manrope = localFont({
|
|
128
|
+
src: [
|
|
129
|
+
{
|
|
130
|
+
path: "../node_modules/@fontsource-variable/manrope/files/manrope-latin-wght-normal.woff2",
|
|
131
|
+
weight: "200 800",
|
|
132
|
+
style: "normal",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
display: "swap",
|
|
136
|
+
declarations: [{ prop: "font-family", value: "'Manrope'" }],
|
|
137
|
+
variable: "--font-reg-manrope",
|
|
138
|
+
});
|
|
139
|
+
const sora = localFont({
|
|
140
|
+
src: [
|
|
141
|
+
{
|
|
142
|
+
path: "../node_modules/@fontsource-variable/sora/files/sora-latin-wght-normal.woff2",
|
|
143
|
+
weight: "100 800",
|
|
144
|
+
style: "normal",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
display: "swap",
|
|
148
|
+
declarations: [{ prop: "font-family", value: "'Sora'" }],
|
|
149
|
+
variable: "--font-reg-sora",
|
|
150
|
+
});
|
|
151
|
+
const workSans = localFont({
|
|
152
|
+
src: [
|
|
153
|
+
{
|
|
154
|
+
path: "../node_modules/@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2",
|
|
155
|
+
weight: "100 900",
|
|
156
|
+
style: "normal",
|
|
157
|
+
},
|
|
158
|
+
],
|
|
81
159
|
display: "swap",
|
|
160
|
+
declarations: [{ prop: "font-family", value: "'Work Sans'" }],
|
|
82
161
|
variable: "--font-reg-work-sans",
|
|
83
162
|
});
|
|
84
|
-
const dmSans =
|
|
85
|
-
|
|
86
|
-
|
|
163
|
+
const dmSans = localFont({
|
|
164
|
+
src: [
|
|
165
|
+
{
|
|
166
|
+
path: "../node_modules/@fontsource-variable/dm-sans/files/dm-sans-latin-wght-normal.woff2",
|
|
167
|
+
weight: "100 1000",
|
|
168
|
+
style: "normal",
|
|
169
|
+
},
|
|
170
|
+
],
|
|
87
171
|
display: "swap",
|
|
172
|
+
declarations: [{ prop: "font-family", value: "'DM Sans'" }],
|
|
173
|
+
variable: "--font-reg-dm-sans",
|
|
174
|
+
});
|
|
175
|
+
const plusJakartaSans = localFont({
|
|
176
|
+
src: [
|
|
177
|
+
{
|
|
178
|
+
path: "../node_modules/@fontsource-variable/plus-jakarta-sans/files/plus-jakarta-sans-latin-wght-normal.woff2",
|
|
179
|
+
weight: "200 800",
|
|
180
|
+
style: "normal",
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
display: "swap",
|
|
184
|
+
declarations: [{ prop: "font-family", value: "'Plus Jakarta Sans'" }],
|
|
88
185
|
variable: "--font-reg-plus-jakarta-sans",
|
|
89
186
|
});
|
|
90
|
-
const outfit =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
187
|
+
const outfit = localFont({
|
|
188
|
+
src: [
|
|
189
|
+
{
|
|
190
|
+
path: "../node_modules/@fontsource-variable/outfit/files/outfit-latin-wght-normal.woff2",
|
|
191
|
+
weight: "100 900",
|
|
192
|
+
style: "normal",
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
display: "swap",
|
|
196
|
+
declarations: [{ prop: "font-family", value: "'Outfit'" }],
|
|
197
|
+
variable: "--font-reg-outfit",
|
|
198
|
+
});
|
|
199
|
+
const figtree = localFont({
|
|
200
|
+
src: [
|
|
201
|
+
{
|
|
202
|
+
path: "../node_modules/@fontsource-variable/figtree/files/figtree-latin-wght-normal.woff2",
|
|
203
|
+
weight: "300 900",
|
|
204
|
+
style: "normal",
|
|
205
|
+
},
|
|
206
|
+
],
|
|
94
207
|
display: "swap",
|
|
208
|
+
declarations: [{ prop: "font-family", value: "'Figtree'" }],
|
|
209
|
+
variable: "--font-reg-figtree",
|
|
210
|
+
});
|
|
211
|
+
const montserrat = localFont({
|
|
212
|
+
src: [
|
|
213
|
+
{
|
|
214
|
+
path: "../node_modules/@fontsource-variable/montserrat/files/montserrat-latin-wght-normal.woff2",
|
|
215
|
+
weight: "100 900",
|
|
216
|
+
style: "normal",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
display: "swap",
|
|
220
|
+
declarations: [{ prop: "font-family", value: "'Montserrat'" }],
|
|
95
221
|
variable: "--font-reg-montserrat",
|
|
96
222
|
});
|
|
97
|
-
const lexend =
|
|
98
|
-
|
|
99
|
-
|
|
223
|
+
const lexend = localFont({
|
|
224
|
+
src: [
|
|
225
|
+
{
|
|
226
|
+
path: "../node_modules/@fontsource-variable/lexend/files/lexend-latin-wght-normal.woff2",
|
|
227
|
+
weight: "100 900",
|
|
228
|
+
style: "normal",
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
display: "swap",
|
|
232
|
+
declarations: [{ prop: "font-family", value: "'Lexend'" }],
|
|
233
|
+
variable: "--font-reg-lexend",
|
|
234
|
+
});
|
|
235
|
+
const firaCode = localFont({
|
|
236
|
+
src: [
|
|
237
|
+
{
|
|
238
|
+
path: "../node_modules/@fontsource-variable/fira-code/files/fira-code-latin-wght-normal.woff2",
|
|
239
|
+
weight: "300 700",
|
|
240
|
+
style: "normal",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
100
243
|
display: "swap",
|
|
244
|
+
declarations: [{ prop: "font-family", value: "'Fira Code'" }],
|
|
101
245
|
variable: "--font-reg-fira-code",
|
|
102
246
|
});
|
|
103
|
-
const robotoMono =
|
|
104
|
-
|
|
247
|
+
const robotoMono = localFont({
|
|
248
|
+
src: [
|
|
249
|
+
{
|
|
250
|
+
path: "../node_modules/@fontsource-variable/roboto-mono/files/roboto-mono-latin-wght-normal.woff2",
|
|
251
|
+
weight: "100 700",
|
|
252
|
+
style: "normal",
|
|
253
|
+
},
|
|
254
|
+
],
|
|
105
255
|
display: "swap",
|
|
256
|
+
declarations: [{ prop: "font-family", value: "'Roboto Mono'" }],
|
|
106
257
|
variable: "--font-reg-roboto-mono",
|
|
107
258
|
});
|
|
108
|
-
const sourceSerif4 =
|
|
109
|
-
|
|
259
|
+
const sourceSerif4 = localFont({
|
|
260
|
+
src: [
|
|
261
|
+
{
|
|
262
|
+
path: "../node_modules/@fontsource-variable/source-serif-4/files/source-serif-4-latin-wght-normal.woff2",
|
|
263
|
+
weight: "200 900",
|
|
264
|
+
style: "normal",
|
|
265
|
+
},
|
|
266
|
+
],
|
|
110
267
|
display: "swap",
|
|
268
|
+
declarations: [{ prop: "font-family", value: "'Source Serif 4'" }],
|
|
269
|
+
adjustFontFallback: "Times New Roman",
|
|
111
270
|
variable: "--font-reg-source-serif-4",
|
|
112
271
|
});
|
|
113
|
-
const sourceCodePro =
|
|
114
|
-
|
|
272
|
+
const sourceCodePro = localFont({
|
|
273
|
+
src: [
|
|
274
|
+
{
|
|
275
|
+
path: "../node_modules/@fontsource-variable/source-code-pro/files/source-code-pro-latin-wght-normal.woff2",
|
|
276
|
+
weight: "200 900",
|
|
277
|
+
style: "normal",
|
|
278
|
+
},
|
|
279
|
+
],
|
|
115
280
|
display: "swap",
|
|
281
|
+
declarations: [{ prop: "font-family", value: "'Source Code Pro'" }],
|
|
116
282
|
variable: "--font-reg-source-code-pro",
|
|
117
283
|
});
|
|
118
284
|
|
|
@@ -1,92 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
This license is copied below, and is also available with a FAQ at:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
improved in partnership
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
the Font Software to a
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
distributed under
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
COPYRIGHT
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
MiSans 字体知识产权许可协议 (MiSans Font IP License Agreement)
|
|
2
|
+
Source: https://hyperos.mi.com/font/zh/download/ — retrieved 2026-09-25
|
|
3
|
+
|
|
4
|
+
本《MiSans 字体知识产权许可协议》(以下简称“协议”)是您与小米科技有限责任公司(以下简称“小米”或“许可方”)之间有关安装、使用 MiSans 字体(以下简称“MiSans”或“MiSans 字体”)的法律协议。您在使用 MiSans 的所有或任何部分前,应接受本协议中规定的所有条款和条件。安装、使用 MiSans 的行为表示您同意接受本协议所有条款的约束。否则,请不要安装或使用 MiSans,并应立即销毁和删除所有 MiSans 字体包。
|
|
5
|
+
根据本协议的条款和条件,许可方在此授予您一份不可转让的、非独占的、免版税的、可撤销的、全球性的版权许可,使您依照本协议约定使用 MiSans 字体,前提是符合下列条件:
|
|
6
|
+
您应在软件中特别注明使用了 MiSans 字体。
|
|
7
|
+
您不得对 MiSans 字体或其任何单独组件进行改编或二次开发。
|
|
8
|
+
您不得单独将 MiSans 字体或其组件对外租赁、再许可、给予、出借或进一步分发字体软件或其任何副本以及重新分发或售卖。此限制不适用于您使用 MiSans 字体创作的任何其他作品。如您使用 MiSans 字体创作宣传素材、logo、应用 App 等,您有权分发或出售该作品。
|
|
9
|
+
|
|
10
|
+
FAQ (https://hyperos.mi.com/font/zh/faq/):
|
|
11
|
+
- 是否需要付费?不需要。MiSans Global 所有的字体都是供全球免费商用。
|
|
12
|
+
- 是否可以用作嵌入式字体?可以。但您应在软件中特别注明使用了 MiSans 字体。
|
|
13
|
+
- 我可以在软件中修改编辑、二次创作字体吗?您可以自由调节字体的粗细、间距等。但您不得单独将 MiSans 字体或其组件进行外观上的更改。
|
package/dist/chunk-GRE7GS6W.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|