Skip to content

Building

Prerequisites

The font build requires Git, Make (GNU Make 3.81 or newer), FontForge with Python, ttfautohint, and uv. On macOS:

brew install fontforge ttfautohint
make

Building the documentation site webfonts additionally uses woff2_compress (brew install woff2 on macOS, apt install woff2 on Debian/Ubuntu).

Make targets

Target Action
make Build and validate all styles (default goal: check)
make build Write the compiled TTFs and OFL notices to fonts/
make check Validate every style with scripts/validate.py
make proof Render comparison proof sheets to build/proof/
make webfonts Compress fonts/AutomataMono-*.ttf into docs/assets/fonts/*.woff2
make docs Build webfonts and the Zensical documentation site into site/
make sources Fetch and verify the pinned upstream repositories
make clean Remove build/ and the generated font and license files in fonts/

Pipeline

Each of the 10 styles passes through three build stages:

flowchart LR
    U[RobotoMono-Style.ttf] --> FF[1. scripts/build_font.py<br/>FontForge]
    F[FiraCode-Weight.otf] --> FF
    FF --> I[build/AutomataMono-Style.fontforge.ttf<br/>+ .json manifest]
    I --> FIN[2. scripts/finalize.py<br/>fontTools under uv]
    FIN --> UH[build/AutomataMono-Style.unhinted.ttf]
    UH --> AH[3. ttfautohint]
    AH --> OUT[fonts/AutomataMono-Style.ttf]
  1. scripts/build_font.py runs in FontForge's embedded Python (fontforge -lang=py -script). It applies the glyph customizations to the upstream Roboto Mono TTF, imports the retained Fira Code ligatures, and writes build/AutomataMono-<Style>.fontforge.ttf along with a JSON manifest of every glyph it modified.
  2. scripts/finalize.py runs with fontTools under uv. It strips FontForge artifacts (GPOS, GDEF, legacy Mac cmap subtables, old hinting tables), widens .null to the cell advance, writes Automata Mono names and metadata, recomputes left side bearings, and restores the italic caret slope and underline position that FontForge rewrites.
  3. ttfautohint regenerates TrueType hinting and writes the release font to fonts/AutomataMono-<Style>.ttf.

Pinned upstream sources

Upstream checkouts are fetched shallowly at commits pinned in the Makefile. An existing checkout at a different commit stops the build. Never modify files inside RobotoMono/ or Ligaturizer/; to update an upstream pin, edit the commit hash in Makefile, run make clean, and rebuild with make.

Directory Repository Pinned commit
RobotoMono/ googlefonts/RobotoMono 7bf0b33
Ligaturizer/ ToxicFrog/Ligaturizer c406518
Ligaturizer/fonts/fira/ Fira Code v3.1 (Ligaturizer submodule) e9943d2

Python environments and code quality

Two Python runtimes are used:

  • FontForge's embedded Python executes scripts/build_font.py, scripts/fira_ligatures.py, and scripts/customizations/*. These modules may import only the standard library, fontforge, psMat, and Ligaturizer's data/driver modules.
  • uv-managed Python (>=3.12, locked in uv.lock) executes scripts/finalize.py, scripts/validate.py, scripts/proof.py, and the dev tools (ruff, zensical, mkdocstrings-python). pyproject.toml enforces a 7-day dependency cooldown (exclude-newer = "7 days").
  • scripts/config.py is imported by both environments and must remain standard-library only. Keep STYLES and FIRA_WEIGHTS in sync with the Makefile.

After any Python change, format and lint with Ruff:

uv run --locked ruff format
uv run --locked ruff check

Building the documentation site locally

Generate the WOFF2 webfonts from fonts/ and serve or build the Zensical site:

make webfonts
uv run --locked zensical serve

Or run make docs for a full strict build into site/.