maple-font/source/schema.json

259 lines
9.4 KiB
JSON
Raw Normal View History

2024-07-09 08:48:01 +00:00
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Maple Mono Build Configuration Schema",
"description": "Schema for the build configuration of Maple Mono",
2024-07-09 08:48:01 +00:00
"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"
]
}
},
2024-07-09 08:48:01 +00:00
"properties": {
"pool_size": {
"type": "number",
2024-07-28 05:05:01 +00:00
"description": "The number of parallel tasks. Default is 4. When run in codespace, this will be 1",
2024-07-09 08:48:01 +00:00
"default": 4
},
"family_name": {
"type": "string",
"description": "The font family name",
"default": "Maple Mono"
},
"use_hinted": {
"type": "boolean",
"description": "Whether to use hinted TTF as base font",
"default": true
},
"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
},
2024-07-27 14:28:49 +00:00
"feature_freeze": {
"type": "object",
2024-10-14 06:21:26 +00:00
"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",
2024-07-27 14:28:49 +00:00
"properties": {
"cv01": {
2024-10-13 11:14:59 +00:00
"description": "Classic '@', '$', '%', '&', 'Q', '=>', '->'",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
"cv02": {
"description": "Alternative 'a' (with top alarm)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
"cv03": {
"description": "Alternative regular 'i' (without bottom left bar)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
"cv04": {
2024-10-13 11:14:59 +00:00
"description": "Alternative 'l' (with bottom left bar) and '1' (without bottom bar), will be overrided by cv35 in italic style",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"cv31": {
"description": "[Italic Only] Alternative 'a' (with top alarm)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"cv32": {
"description": "[Italic Only] Alternative 'f' (without bottom tail)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"cv33": {
"description": "[Italic Only] Alternative 'i' (with bottom left bar) and 'j'",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"cv34": {
"description": "[Italic Only] Alternative 'k' (without center circle)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"cv35": {
"description": "[Italic Only] Alternative 'l' (without center tail)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"cv36": {
"description": "[Italic Only] Alternative 'x' (without top and bottom tails)",
"$ref": "#/definitions/freeze_options"
},
"cv96": {
"description": "[CN Only] Full width '“'(double quote left), '”'(double quote right), ''(single quote left), ''(single quote right)",
"$ref": "#/definitions/freeze_options"
},
"cv97": {
"description": "[CN Only] Full width '…'(ellipsis)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"cv98": {
"description": "[CN Only] Full width '—'(emdash)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"cv99": {
"description": "[CN Only] Traditional punctuations",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"ss01": {
"description": "Broken equals ligatures (==, ===, !=, !==, =/=)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"ss02": {
"description": "Broken compare and equal ligatures (<=, >=)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"ss03": {
"description": "Enable arbitrary tag (allow to use any case letters in all tags)",
"$ref": "#/definitions/freeze_options"
},
2024-10-13 11:14:59 +00:00
"ss04": {
"description": "Break multiple underscores (__, #__)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"ss05": {
"description": "Restore the thickness of backslash in escape letters (\\\\, \\', \\[, ...)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"ss06": {
"description": "[Italic Only] Break connected strokes between italic letters (al, ul, il ...)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
2024-10-13 11:14:59 +00:00
"ss07": {
"description": "Relax the conditions for enabling multiple greater ligatures (>>, >>>)",
"$ref": "#/definitions/freeze_options"
},
"ss08": {
"description": "Enable double headed arrows and reverse arrows (>>=, -<<, ->>, >- ...)",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
},
"zero": {
"description": "Dot style '0'",
"$ref": "#/definitions/freeze_options"
2024-07-27 14:28:49 +00:00
}
}
},
"github_mirror": {
"type": "string",
"description": "Github mirror config, will download from https://{github_mirror}/<user>/<repo>/releases/download/<tag>/<file>",
"default": "github.com"
},
2024-07-09 08:48:01 +00:00
"nerd_font": {
"type": "object",
"description": "Config for Nerd-Font",
2024-07-09 08:48:01 +00:00
"properties": {
"enable": {
"type": "boolean",
"description": "Whether to enable Nerd-Font",
2024-07-09 08:48:01 +00:00
"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",
2024-07-09 08:48:01 +00:00
"default": "3.2.1"
},
"mono": {
"type": "boolean",
"description": "Whether to make icon width fixed",
"default": false
},
2024-07-29 05:21:36 +00:00
"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"
},
2024-07-09 08:48:01 +00:00
"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",
2024-07-09 08:48:01 +00:00
"default": false
},
"glyphs": {
"type": "array",
"items": {
"type": "string"
},
2024-07-27 14:28:49 +00:00
"default": [
"--complete"
],
2024-07-09 08:48:01 +00:00
"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",
2024-07-27 09:33:15 +00:00
"description": "Config for Chinese font",
2024-07-09 08:48:01 +00:00
"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",
2024-07-09 08:48:01 +00:00
"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": "[Experimental] Whether to narrow CN characters. THIS WILL BREAK THE 2:1 METRIC\nOnly supported in VSCode currently",
2024-09-14 07:51:38 +00:00
"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
2024-07-09 08:48:01 +00:00
}
},
"required": [
"enable",
"with_nerd_font",
"fix_meta_table",
"clean_cache",
"narrow",
"use_hinted",
"use_static_base_font"
2024-07-09 08:48:01 +00:00
]
}
},
"required": [
"family_name",
"use_hinted",
"ligature",
2024-07-09 08:48:01 +00:00
"nerd_font",
"cn"
]
}