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

Installation

uv tool install var2stat

Usage

  • Step 1: Generate config from variable font (creates <font_file>-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.2.1.tar.gz (15.3 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.2.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for var2stat-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c06ccc4e5b7a2226ef616deefeeb7585c8ffaa63e87881e8ee7d20f5a18de581
MD5 c5006750221d92be4982505c80eccea2
BLAKE2b-256 295b9dad801c75a2f31e564a959ce6982ecf8de4da7ce27860b92ce794bccaeb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for var2stat-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 600f633f0fe205cab9a61324c4128e86c27006522164fbdf8a5821eb1f46f95e
MD5 92a29a347776c44ea8e9c1abfe35670b
BLAKE2b-256 e7b5daf3bd16ac48c7ee99240c47bf49ed7e5ff0c91101ab668378a9a2bceb7e

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