Skip to main content

Convert variable fonts to static font instances

Project description

Var2Stat

Convert variable fonts to static font instances with configuration-based axis control.

Features

  • Extract axis information and generate optimized configuration files
  • Smart axis inheritance (global defaults with variant overrides)
  • True static output with all variation tables removed

Usage

  • Step 1: Generate config from variable font (creates {FontName}-config.json in 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.

Config Structure

{
  "$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 null use font defaults
  • Variant axes override global values

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

var2stat-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

var2stat-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file var2stat-0.1.0.tar.gz.

File metadata

  • Download URL: var2stat-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for var2stat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd6c6fcef53d4251968f9a7f0651164ffd637be593597ba66f937fa5c8531cfa
MD5 ac004d4316c54e4daf883f36cae06f63
BLAKE2b-256 c93c3960fdd693b1360ae80a7c79ddfd2b27e462f08c158b5207d5748cf01333

See more details on using hashes here.

File details

Details for the file var2stat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: var2stat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for var2stat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 893b336a9d37a245e83a4841bbb6c20dfc75ae9763aa2dd9b43c0eb1e2b160d8
MD5 fc9d943f766107e64be7eb8f91af5b05
BLAKE2b-256 26cb1229a0087d44071c39c11d6b6711f28f7010f0592bddd88517be75418d7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page