maple-font/source/schema.json
2024-07-28 13:05:01 +08:00

217 lines
No EOL
6.1 KiB
JSON

{
"title": "Build Configuration Schema",
"description": "Schema for the build configuration of a font project",
"type": "object",
"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"
},
"use_hinted": {
"type": "boolean",
"description": "Whether to use hinted TTF as base font",
"default": true
},
"feature_freeze": {
"type": "object",
"description": "Freeze some font features \n enable: enable font features by default \n disable: remove some font features \n ignore: skip handle target font features",
"properties": {
"cv01": {
"type": "string",
"description": "Classic '@', '$', '&', 'Q', '=>', '->'",
"enum": [
"ignore",
"disable",
"enable"
]
},
"cv02": {
"type": "string",
"description": "Alternative 'a' (with top alarm)",
"enum": [
"ignore",
"disable",
"enable"
]
},
"cv03": {
"type": "string",
"description": "Alternative 'i' (without bottom left bar)",
"enum": [
"ignore",
"disable",
"enable"
]
},
"cv04": {
"type": "string",
"description": "Alternative 'l' (with bottom left bar) and '1' (without bottom bar)",
"enum": [
"ignore",
"disable",
"enable"
]
},
"cv98": {
"type": "string",
"description": "Full width '…'(ellipsis) and '—'(emdash) support for Maple Mono NF CN",
"enum": [
"ignore",
"disable",
"enable"
]
},
"cv99": {
"type": "string",
"description": "Traditional punctuations support for Maple Mono NF CN",
"enum": [
"ignore",
"disable",
"enable"
]
},
"ss01": {
"type": "string",
"description": "Non-cursive italic style",
"enum": [
"ignore",
"disable",
"enable"
]
},
"ss02": {
"type": "string",
"description": "Disable ligautures on equals like '==', '!=', '<='",
"enum": [
"ignore",
"disable",
"enable"
]
},
"ss03": {
"type": "string",
"description": "Ignore cases on all tags",
"enum": [
"ignore",
"disable",
"enable"
]
},
"ss04": {
"type": "string",
"description": "Disable ligatures on '__', '#__', '***'",
"enum": [
"ignore",
"disable",
"enable"
]
},
"zero": {
"type": "string",
"description": "Dot style '0'",
"enum": [
"ignore",
"disable",
"enable"
]
}
}
},
"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 icon width fixed",
"default": false
},
"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
}
},
"required": [
"enable",
"with_nerd_font",
"fix_meta_table",
"clean_cache"
]
}
},
"required": [
"family_name",
"use_hinted",
"nerd_font",
"cn"
]
}