Metadata-Version: 2.4
Name: var2stat
Version: 0.1.0
Summary: Convert variable fonts to static font instances
License-File: LICENSE
Requires-Python: >=3.14
Requires-Dist: click>=8.3.1
Requires-Dist: fonttools>=4.62.1
Requires-Dist: jsonschema>=4.26.0
Description-Content-Type: text/markdown

# 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):

  ```/dev/null/usage.sh#L1-1
  uvx var2stat config <font_file.ttf>
  ```

- **Step 2**: Generate static fonts from a config file:

  ```/dev/null/usage.sh#L1-1
  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

```json
{
  "$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
