fontTools
$ fonttools Community Low RiskfontTools is the canonical Python toolkit for inspecting, subsetting, merging, and XML-dumping TrueType and OpenType fonts via fonttools, pyftsubset, and ttx. Agents can list SFNT tables with ttx -l, dump XML selectively with -t, and subset web fonts (--flavor=woff2) cleanly in CI.
brew install fonttools Binary font inspection (ttx -l) and subsetting (fonttools subset) process local .ttf/.otf/.woff2 files directly without MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Deterministic headless subcommands (subset, ttx, varLib, merge) with -o - stdout support on ttx, though inspection outputs XML or plain tables rather than JSON.
ttx -landttx -t <table> -o -enable targeted read-only inspection- Outputs XML/plain tables rather than JSON
100% offline local font processing; --output-file / -o keeps original font files untouched.
- Non-destructive when explicit
--output-fileis passed
Available via Homebrew, pip, and uvx across macOS, Linux, and Windows (woff2 output needs brotli).
- Cross-platform
brew install fonttoolsandpip install fonttools
Industry-standard Swiss-army knife for font subsetting, variable-font instancing, and table debugging.
- Covers
subset,ttx,varLib,feaLib, andmergein one suite
Actively maintained by the font engineering community (fonttools/fonttools) under MIT.
- Canonical
fonttools/fonttoolsupstream repository
Comprehensive Read the Docs reference covering CLI tools (subset, ttx, varLib).
- Official docs at fonttools.readthedocs.io
Security, Auth & Guardrails
None required; operates strictly on local font binaries and .ttx XML files.
100% free, offline, and MIT open-source (--flavor=woff2 requires the brotli Python package).
# fontTools Agent Rules - Use `ttx -l <font>` or `ttx -t <tableTag> -o - <font>` for read-only inspection before dumping full `.ttx` files (which can be huge). - Always pass `--output-file=<path>` to `fonttools subset` / `pyftsubset` so source fonts are preserved.
Agent-Ready Command Recipes
Safe Read-Only Queries
ttx -l font.ttf
Prints the SFNT table directory (cmap, glyf, GSUB, etc.) without modifying or dumping files.
ttx -t name -o - font.ttf
Exports only the name table as XML to stdout (-o -) for safe inspection.
Controlled Writes & Previews
fonttools subset font.ttf --unicodes=U+0020-007E --output-file=font.subset.ttf
Creates a compact font.subset.ttf containing only the requested Unicode range.
Strengths for Agents
- + Canonical industry toolkit for font subsetting (
pyftsubset), variable font instancing, andttxXML inspection. - +
ttx -landttx -t <table> -o -prevent dumping multi-megabyte glyph tables unnecessarily. - + 100% offline and MIT open-source.
Caveats & Pitfalls
- ! Using
--flavor=woff2requires installingfonttools[woff](brotli). - ! Full
ttxdumps of CJK fonts can generate tens of megabytes of XML.