forked from subframe7536/maple-font
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.json
More file actions
508 lines (508 loc) · 18.7 KB
/
schema.json
File metadata and controls
508 lines (508 loc) · 18.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Maple Mono Build Configuration Schema",
"description": "Schema for the build configuration of Maple Mono",
"type": "object",
"definitions": {
"freeze_options": {
"type": "string",
"enum": [
"ignore",
"disable",
"enable"
],
"enumDescriptions": [
"Do nothing",
"Remove the features from font file",
"Enable the features as default ligatures"
]
},
"stem_width_mode": {
"type": "string",
"enum": [
"strong",
"quantized",
"natural"
],
"enumDescriptions": [
"If active, stem widths and blue zones are snapped and positioned to integer pixel values as much as possible. This gives high contrast, but glyph shape distortion can be significant.",
"Both stem widths and blue zone positions are slightly quantized to take discrete values. For example, stem values 50, 51, 72, 76, and 100 would become 50, 74, and 100 (or something similar). More glyph shape distortion but increased contrast.",
"No adjustments to stem widths, discrete blue zone positioning. This is what FreeType uses for its \u2018light\u2019 (auto-)hinting mode. Essentially no glyph shape distortion, low contrast."
]
}
},
"properties": {
"pool_size": {
"type": "number",
"description": "The number of parallel tasks. Default is 4. When run in codespace, this will be 1",
"default": 4
},
"family_name": {
"type": "string",
"description": "The font family name",
"default": "Maple Mono"
},
"weight_mapping": {
"type": "object",
"properties": {
"thin": {
"type": "number",
"description": "Weight mapping of thin",
"default": 100
},
"extralight": {
"type": "number",
"description": "Weight mapping of extra light",
"default": 200
},
"light": {
"type": "number",
"description": "Weight mapping of light",
"default": 300
},
"regular": {
"type": "number",
"description": "Weight mapping of regular",
"default": 400
},
"semibold": {
"type": "number",
"description": "Weight mapping of semibold",
"default": 500
},
"medium": {
"type": "number",
"description": "Weight mapping of medium",
"default": 600
},
"bold": {
"type": "number",
"description": "Weight mapping of bold",
"default": 700
},
"extrabold": {
"type": "number",
"description": "Weight mapping of extra bold",
"default": 800
}
}
},
"use_hinted": {
"type": "boolean",
"description": "Whether to use hinted TTF as base font",
"default": true
},
"ligature": {
"type": "boolean",
"description": "(Deprecated) Use \"enable_ligature\" instead",
"default": true
},
"enable_ligature": {
"type": "boolean",
"description": "Whether to enable ligature.\nIf set to false, all the ligatures will be removed and 'ssXX' options in 'feature_freeze' will no longer effect",
"default": true
},
"infinite_arrow": {
"type": [
"boolean",
"null"
],
"description": "Enable infinite arrow ligatures\n- null: disabled in hinted font, enabled in unhinted font\n- true: enabled\n- false: disabled",
"default": null
},
"keep_infinite_arrow": {
"type": "boolean",
"description": "(Deprecated) Use \"infinite_arrow\" instead",
"default": false
},
"remove_tag_liga": {
"type": "boolean",
"description": "Remove plain text tag ligatures like `[TODO]`",
"default": false
},
"line_height": {
"type": "number",
"description": "Scale factor for line height. (e.g. 1.1)",
"default": 1.0
},
"width": {
"type": "string",
"enum": [
"default",
"narrow",
"slim"
],
"description": "Set glyph width: default (600), narrow (550), slim (500)",
"default": "default"
},
"ttfautohint_param": {
"type": "object",
"description": "Parameters for ttfautohint, see details in https://freetype.org/ttfautohint/doc/ttfautohint.html#options",
"properties": {
"hinting_limit": {
"type": "integer",
"description": "The PPEM value (in pixels) where hinting gets switched off",
"default": 200
},
"hinting_range_min": {
"type": "integer",
"description": "The minimum PPEM value (in pixels) at which hint sets are created",
"default": 8
},
"hinting_range_max": {
"type": "integer",
"description": "The maximum PPEM value (in pixels) at which hint sets are created",
"default": 50
},
"increase_x_height": {
"type": "integer",
"minimum": 0,
"default": 14,
"description": "Maximum PPEM (6 to n) for x-height rounding up to improve legibility. Set to 0 to disable."
},
"stem_width_mode": {
"type": "object",
"description": "Algorithms for computing horizontal stem widths and the positioning of blue zones.",
"properties": {
"gray": {
"description": "Grayscale rendering, with or without optimization for subpixel positioning (e.g., Android).",
"$ref": "#/definitions/stem_width_mode"
},
"gdi_cleartype": {
"description": "\u2018GDI ClearType\u2019 rendering: the rasterizer version, as returned by the GETINFO bytecode instruction, is in the range 36 <= version <= 38 and ClearType is enabled (e.g., Windows XP).",
"$ref": "#/definitions/stem_width_mode"
},
"dw_cleartype": {
"description": "\u2018DirectWrite ClearType\u2019 rendering: the rasterizer version, as returned by the GETINFO bytecode instruction, is >= 39, ClearType is enabled, and subpixel positioning is enabled also (e.g., Internet Explorer 9 running on Windows 7).",
"$ref": "#/definitions/stem_width_mode"
}
}
}
}
},
"feature_freeze": {
"type": "object",
"description": "Freeze some font features (No effect on Variable font) \n enable: Move ligature rules to `calt`, which will enable the ligatures without setting up `cvXX` / `ssXX` / `zero` in font features config, just as default ligatures \n disable: Remove the ligature rules in `cvXX` / `ssXX` / `zero`, which will no longer effect, even if you enable it manually \n ignore: Do nothing",
"properties": {
"cv01": {
"description": "[v7.0] Normalize special symbols ('@ $ & % Q => ->')",
"$ref": "#/definitions/freeze_options"
},
"cv02": {
"description": "[v7.0] Alternative 'a' with top arm, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv03": {
"description": "[v7.0] Alternative 'i' without left bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv04": {
"description": "[v7.0] Alternative 'l' with left bottom bar, like consolas, will be overrided by 'cv35' in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv05": {
"description": "[v7.1] Alternative 'g' in double story style, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv06": {
"description": "[v7.1] Alternative 'i' without bottom bar, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv07": {
"description": "[v7.1] Alternative 'J' without top bar, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv08": {
"description": "[v7.1] Alternative 'r' with bottom bar, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv09": {
"description": "[v7.5] Alternative '7' with middle bar, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv10": {
"description": "[v7.5] Alternative 'Z' and 'z' with middle bar, no effect in italic style",
"$ref": "#/definitions/freeze_options"
},
"cv11": {
"description": "[v7.7] Alternative 'f' with bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv31": {
"description": "[v7.0] Alternative italic 'a' with top arm",
"$ref": "#/definitions/freeze_options"
},
"cv32": {
"description": "[v7.0] Alternative Italic 'f' without bottom tail",
"$ref": "#/definitions/freeze_options"
},
"cv33": {
"description": "[v7.0] Alternative Italic 'i' and 'j' with left bottom bar and horizen top bar",
"$ref": "#/definitions/freeze_options"
},
"cv34": {
"description": "[v7.0] Alternative Italic 'k' without center circle",
"$ref": "#/definitions/freeze_options"
},
"cv35": {
"description": "[v7.0] Alternative Italic 'l' without center tail",
"$ref": "#/definitions/freeze_options"
},
"cv36": {
"description": "[v7.0] Alternative Italic 'x' without top and bottom tails",
"$ref": "#/definitions/freeze_options"
},
"cv37": {
"description": "[v7.0] Alternative Italic 'y' with straight intersection",
"$ref": "#/definitions/freeze_options"
},
"cv38": {
"description": "[v7.1] Alternative italic 'g' in double story style",
"$ref": "#/definitions/freeze_options"
},
"cv39": {
"description": "[v7.1] Alternative Italic 'i' without bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv40": {
"description": "[v7.1] Alternative italic 'J' without top bar",
"$ref": "#/definitions/freeze_options"
},
"cv41": {
"description": "[v7.1] Alternative italic 'r' with bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv42": {
"description": "[v7.5] Alternative italic '7' with middle bar",
"$ref": "#/definitions/freeze_options"
},
"cv43": {
"description": "[v7.5] Alternative italic 'Z' and 'z' with middle bar",
"$ref": "#/definitions/freeze_options"
},
"cv44": {
"description": "[v7.7] Alternative Italic 'f' with bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv61": {
"description": "[v7.1] Alternative ',' and ';' with straight tail",
"$ref": "#/definitions/freeze_options"
},
"cv62": {
"description": "[v7.1] Alternative '?' with larger openings",
"$ref": "#/definitions/freeze_options"
},
"cv63": {
"description": "[v7.1] Alternative '<=' in arrow style",
"$ref": "#/definitions/freeze_options"
},
"cv64": {
"description": "[v7.3] Alternative '<=' and '>=' with horizen bottom bar",
"$ref": "#/definitions/freeze_options"
},
"cv65": {
"description": "[v7.3] Alternative '&' in handwriting style",
"$ref": "#/definitions/freeze_options"
},
"cv66": {
"description": "[v7.8] Alternative pipe arrows",
"$ref": "#/definitions/freeze_options"
},
"cv96": {
"description": "[v7.0] Full width quotes ('\u201c' / '\u201d' / '\u2018' / '\u2019')",
"$ref": "#/definitions/freeze_options"
},
"cv97": {
"description": "[v7.0] Full width ellipsis ('\u2026')",
"$ref": "#/definitions/freeze_options"
},
"cv98": {
"description": "[v7.0] Full width emdash ('\u2014')",
"$ref": "#/definitions/freeze_options"
},
"cv99": {
"description": "[v7.0] Traditional centered punctuations",
"$ref": "#/definitions/freeze_options"
},
"ss01": {
"description": "[v7.0] Broken multiple equals ligatures ('==', '===', '!=', '!==' ...)",
"$ref": "#/definitions/freeze_options"
},
"ss02": {
"description": "[v7.0] Broken compare and equal ligatures ('<=', '>=')",
"$ref": "#/definitions/freeze_options"
},
"ss03": {
"description": "[v7.0] Allow to use any case in all tags",
"$ref": "#/definitions/freeze_options"
},
"ss04": {
"description": "[v7.0] Broken multiple underscores ligatures ('__', '#__')",
"$ref": "#/definitions/freeze_options"
},
"ss05": {
"description": "[v7.0] Revert thin backslash in escape symbols ('\\\\', '\\\"', '\\.' ...)",
"$ref": "#/definitions/freeze_options"
},
"ss06": {
"description": "[v7.0] Break connected strokes between italic letters ('al', 'il', 'ull' ...)",
"$ref": "#/definitions/freeze_options"
},
"ss07": {
"description": "[v7.0] Relax the conditions for multiple greaters ligatures ('>>' or '>>>')",
"$ref": "#/definitions/freeze_options"
},
"ss08": {
"description": "[v7.0] Double headed arrows and reverse arrows ligatures ('>>=', '-<<', '->>', '>>-' ...)",
"$ref": "#/definitions/freeze_options"
},
"ss09": {
"description": "[v7.1] Asciitilde equal as not equal to ligature ('~=')",
"$ref": "#/definitions/freeze_options"
},
"ss10": {
"description": "[v7.1] Approximately equal to and approximately not equal to ligatures ('=~', '!~')",
"$ref": "#/definitions/freeze_options"
},
"ss11": {
"description": "[v7.1] Equal and extra punctuation ligatures ('|=', '/=', '?=', '&=', ...)",
"$ref": "#/definitions/freeze_options"
},
"zero": {
"description": "[v7.0] Dot style '0'",
"$ref": "#/definitions/freeze_options"
}
}
},
"github_mirror": {
"type": "string",
"description": "Github mirror config, will download from https://{github_mirror}/<user>/<repo>/releases/download/<tag>/<file>",
"default": "github.com"
},
"nerd_font": {
"type": "object",
"description": "Config for Nerd-Font",
"properties": {
"enable": {
"type": "boolean",
"description": "Whether to enable Nerd-Font",
"default": true
},
"version": {
"type": "string",
"description": "Target version of Nerd-Font. If font-patcher not exists when need to use it or there is no prebuild font for current version, will download from Github",
"default": "3.2.1"
},
"mono": {
"type": "boolean",
"description": "Whether to make icons' width fixed",
"default": false
},
"propo": {
"type": "boolean",
"description": "Whether to make icons' width variable, override \"mono\"",
"default": false
},
"font_forge_bin": {
"type": "string",
"description": "Font Forge bin path. Default: \n Windows: C:/Program Files (x86)/FontForgeBuilds/bin/fontforge.exe \n MacOS: /Applications/FontForge.app/Contents/Resources/opt/local/bin/fontforge\" \n Linux: /usr/bin/fontforge"
},
"use_font_patcher": {
"type": "boolean",
"description": "Prefer to use Font Patcher instead of using prebuilt NerdFont base font. If you want to custom build Nerd-Font using font-patcher, you need to set this to True",
"default": false
},
"glyphs": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"--complete"
],
"description": "Symbol Fonts settings. if is not [\"--complete\"], will use font-patcher to generate fonts. Full args: https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#font-patcher"
},
"extra_args": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Extra arguments for font-patcher, default args: [\"-l\", \"--careful\", \"--outputdir\", output_nf], if \"mono\" is set to true, \"--mono\" will be added, full args: https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#font-patcher"
}
},
"required": [
"enable",
"version",
"mono",
"use_font_patcher",
"glyphs",
"extra_args"
]
},
"cn": {
"type": "object",
"description": "Config for Chinese font",
"properties": {
"enable": {
"type": "boolean",
"description": "Whether to build Chinese fonts. Skip if Chinese base fonts are not founded",
"default": true
},
"with_nerd_font": {
"type": "boolean",
"description": "Whether to patch Nerd-Font",
"default": true
},
"fix_meta_table": {
"type": "boolean",
"description": "Fix design language and supported languages in META table",
"default": true
},
"clean_cache": {
"type": "boolean",
"description": "Whether to clean instantiated base CN fonts",
"default": false
},
"narrow": {
"type": "boolean",
"description": "Whether to narrow CN characters. This option will make the font cannot be recogized as monospaced font",
"default": false
},
"use_hinted": {
"type": "boolean",
"description": "whether to hint CN font (will increase about 33% size)",
"default": false
},
"use_static_base_font": {
"type": "boolean",
"description": "whether to use large pre-instantiated static CN font as base font (instantiate will cost 40-50 minutes)",
"default": true
},
"scale_factor": {
"type": [
"number",
"array"
],
"description": "Scale factor for CN / JP glyphs with <factor> or [<width_factor>,<height_factor>](e.g. 1.1 or [1.2, 1.1])",
"default": 1.0
}
},
"required": [
"enable",
"with_nerd_font",
"fix_meta_table",
"clean_cache",
"narrow",
"use_hinted",
"use_static_base_font"
]
}
},
"required": [
"family_name",
"use_hinted",
"nerd_font",
"cn"
]
}