What it does
glyphhanger is a command-line utility for examining Unicode use and subsetting webfonts. It supports local files, URLs, font-family filters and generated CSS.
Install glyphhanger through npm, together with Python, fontTools and Brotli for subsetting. A command can inspect a local HTML or text file, or a URL, and report the characters it uses. Adding --subset selects font files to reduce; --formats chooses TTF, WOFF or WOFF2, and --css writes the accompanying font-face rules.
For a publication site, use the font-family or CSS-selector filters to isolate the text a particular font serves. The spider follows local links, with a default limit of ten pages that can be changed. A whitelist adds characters that current pages do not contain, such as numerals or symbols needed in future updates.
The default scan uses headless Chrome. A lighter jsdom mode is available for suitable static input, but the documentation describes the browser mode as safer for JavaScript-generated content. The utility is MIT-licensed and runs locally without a glyphhanger account. Its subset only reflects the content and extra characters you include.
Strengths
- Family and selector filters isolate relevant text.
- Whitelists supplement characters discovered from pages.
- Can write subset files and matching CSS together.
Watch out for
- Subsetting requires Python, fontTools and related dependencies.
- The faster jsdom mode is less suitable for JavaScript-generated content.
- A crawl can miss characters needed by future content.
Best for
- Build-time webfont subsetting
- Developers optimizing a known content collection
Sources
- glyphhanger README (Oct 27, 2026)
- glyphhanger MIT License (Oct 27, 2026)
