$ show tonsky/FiraCode
FiraCode is a monospaced programming font with extensive programming ligatures, built and maintained primarily by Nikita Prokopov. The repository contains the source design file (FiraCode.glyphs, Glyphs.app format), a Clojure-based pipeline that programmatically generates OpenType contextual alternates (calt) substitution rules from a list of ligature sequences, and a comprehensive build system (Makefile, shell scripts, Dockerfile) that orchestrates font production (OTF, TTF, variable, WOFF2, WOFF) using modern font tooling (fontmake, glyphsLib, gftools, fontbakery). The project also includes extensive OpenType feature files (stylistic sets, character variants), a Google Fonts QA workflow, and distribution packages for npm, Homebrew, and direct download. The architecture is a font development pipeline: source → Clojure ligature generator → fontmake compilation → hinting → packaging. It does not run as a service; its production output is the font files delivered to users via package managers or CDN. External dependencies include Python font libraries, a Clojure runtime, and Glyphs.app (proprietary) for editing the source file. The repository is actively maintained with recent commits and an extensive changelog, though some Google Fonts compliance items remain unresolved and the build chain is sensitive to upstream library changes.
The LLM identified 3 files worth highlighting for reuse:
Custom parser and serializer for the Glyphs.app plain-text font format (.glyphs). It handles reading and writing the complex nested structure of glyphs, layers, masters, and feature code. This module is isolated (depends only on Clojure core and a small utility library) and can be reused in other font engineering projects that need to programmatically manipulate .glyphs files without the Glyphs app.
Core engine for generating OpenType contextual alternates (calt) substitution rules from a list of ligature definitions. It implements spacer-based ligature rules with lookup isolation, priority ordering, and ignore-prefix handling. The algorithm is general enough to be adapted for any font project that requires automated generation of complex contextual substitutions from a simple declarative specification.
Shell script that permanently enables a subset of OpenType features (stylistic sets, character variants) by writing feature code directly into the .glyphs source file and renaming the family to reflect the variant (e.g., 'Fira Code iScript'). This pattern allows users to create pinned-feature builds without re-editing the source, and the script is reusable for any font project built from Glyphs sources.