$ show rosettatype/hyperglot
Hyperglot is a Python package and CLI tool that detects language support in font binaries (OTF/TTF). It parses a font's character coverage and compares it against a curated YAML database of language orthographies, where each language (keyed by ISO 639-3 code) defines required character sets: base, auxiliary, marks, and punctuation. The tool reports which languages a font supports, with configurable thresholds for auxiliary character coverage. The repository is hybrid: the dominant character is a data-driven application — the YAML orthography database is the core asset, but it is consumed by a tested Python library with CLI entry points (hyperglot, hyperglot-validate, hyperglot-save) and published on PyPI. The architecture is a classic library-plus-CLI design: YAML data files are loaded and validated by Python modules; font binaries are parsed (via fontTools) and compared against the orthography model; results are aggregated and reported. The test suite (pytest, tox across Python 3.10–3.14) includes pinned test fonts (Eczar, Roboto, Plex) to verify correctness. The database itself follows a strict schema documented in README_database.md, with validation enforced by the hyperglot-validate command. Maintenance is healthy but not hyperactive: the last commit was 2026-09-03, 46 open issues remain, and the CLDR data is pinned to v36 — a version that is several years old by 2026, creating drift risk for locale data. Provisional-draft markers in some YAML entries and a pickle cache that relies on manual version bumps are the main technical debt items. Overall, this is a well-crafted, domain-specific tool with a genuinely useful data model, though it is not architecturally exceptional.
The LLM identified 3 files worth highlighting for reuse:
The core orthography database: a YAML schema keyed by ISO 639-3 code, where each language defines base, auxiliary, marks, and punctuation character sets. This is a clean, well-documented data model for describing language orthographies that could be extracted and reused in any character-coverage validation tool (e.g., web font loaders, accessibility checkers, localization QA). The consistent schema and documented contribution rules (README_database.md) make it a reference-quality dataset.
A CLI tool that validates the YAML orthography database for structural integrity and formatting consistency. It demonstrates a reusable pattern for enforcing schema compliance on hand-maintained data files — applicable to any project that needs linting/validation for structured data with strict formatting rules. The companion hyperglot-save tool normalizes formatting, showing a validate-then-format workflow.
A standalone script that compares multiple font binaries against the orthography database and reports language coverage differences. It demonstrates the hyperglot Python API in a practical, copy-pasteable way and could be adapted into a font-pairing or font-licensing QA tool with minimal changes.