Convert variable fonts to static font instances with configuration-based axis control.
- Extract axis information and generate optimized configuration files
- Smart axis inheritance (global defaults with variant overrides)
- True static output with all variation tables removed
uv tool install var2stat-
Step 1: Generate config from variable font (creates
<font_file>-config.jsonin the same directory as the font):uvx var2stat config <font_file.ttf>
-
Step 2: Generate static fonts from a config file:
uvx var2stat generate <config_file.json>
Output is always saved to a folder named after the canonicalized font name, with files named
<canonical_font_name>_<variant>.ttf.
{
"$schema": "https://raw.githubusercontent.com/decipher3114/Var2Stat/refs/heads/main/schema.json",
"file": "font.ttf",
"font_name": "Font Name",
"axes": { "wght": null, "opsz": 16 },
"variants": {
"Regular": { "wght": 400 },
"Bold": { "wght": 700 }
}
}- Global axes with
nulluse font defaults - Variant axes override global values