Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

fontTools

$ fonttools Community Low Risk
fontTools · Design & Docs · MIT · macos / linux / windows

fontTools 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.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install fonttools
CLI vs MCP Decision CLI Only

Binary font inspection (ttx -l) and subsetting (fonttools subset) process local .ttf/.otf/.woff2 files directly without MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Deterministic headless subcommands (subset, ttx, varLib, merge) with -o - stdout support on ttx, though inspection outputs XML or plain tables rather than JSON.

  • ttx -l and ttx -t <table> -o - enable targeted read-only inspection
  • Outputs XML/plain tables rather than JSON
Trust & Safety 23 / 25

100% offline local font processing; --output-file / -o keeps original font files untouched.

  • Non-destructive when explicit --output-file is passed
Setup & Portability 14 / 15

Available via Homebrew, pip, and uvx across macOS, Linux, and Windows (woff2 output needs brotli).

  • Cross-platform brew install fonttools and pip install fonttools
Utility & Efficiency 14 / 15

Industry-standard Swiss-army knife for font subsetting, variable-font instancing, and table debugging.

  • Covers subset, ttx, varLib, feaLib, and merge in one suite
Maintenance & Lineage 9 / 10

Actively maintained by the font engineering community (fonttools/fonttools) under MIT.

  • Canonical fonttools/fonttools upstream repository
Docs & Verifiability 8 / 10

Comprehensive Read the Docs reference covering CLI tools (subset, ttx, varLib).

  • Official docs at fonttools.readthedocs.io

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; operates strictly on local font binaries and .ttx XML files.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and MIT open-source (--flavor=woff2 requires the brotli Python package).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List all OpenType/TrueType tables in a font
ttx -l font.ttf

Prints the SFNT table directory (cmap, glyf, GSUB, etc.) without modifying or dumping files.

Dump font metadata tables to XML stdout
ttx -t name -o - font.ttf

Exports only the name table as XML to stdout (-o -) for safe inspection.

Controlled Writes & Previews

Subset a font to basic ASCII/Latin glyphs
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, and ttx XML inspection.
  • + ttx -l and ttx -t <table> -o - prevent dumping multi-megabyte glyph tables unnecessarily.
  • + 100% offline and MIT open-source.

Caveats & Pitfalls

  • ! Using --flavor=woff2 requires installing fonttools[woff] (brotli).
  • ! Full ttx dumps of CJK fonts can generate tens of megabytes of XML.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI