Tools for Font Subsetting
You'll learn how to use specialized tools to create custom font subsets that include only the characters you actually need.
Why Use Font Subsetting Tools?
In the previous lesson, you learned what font subsetting is and how Unicode ranges define character groups. Now you need practical tools to actually create those smaller font files. Think of these tools as precision scissors that cut away the parts of your font you'll never use—you wouldn't ship an entire dictionary when you only need a single page.
Three Popular Subsetting Tools
glyphanger
A command-line tool that analyzes your actual HTML to determine exactly which characters appear on your site, then creates a subset containing only those glyphs.
npx glyphanger http://example.com
It's smart—it reads your live pages and tells you precisely what you need.
pyftsubset
Part of the fonttools Python library, this gives you manual control over subsetting. You specify which Unicode ranges or characters to keep.
pyftsubset font.ttf --text="Hello World" --output-file=font-subset.woff2
Online Services
Tools like Font Squirrel's Webfont Generator and Transfonter provide visual interfaces where you can upload fonts, check boxes for character sets (Latin, Cyrillic, etc.), and download optimized files—no coding required.
Which Tool Should You Use?
- glyphanger: Best when you want automatic analysis of real content
- pyftsubset: Best for precise, repeatable build processes
- Online services: Best for one-off conversions and beginners
All three can dramatically reduce file sizes from hundreds of KB to just 10-30 KB for typical web use.
Key Takeaway: Font subsetting tools like glyphanger, pyftsubset, and online generators let you create custom font files containing only the characters you actually need, significantly improving web performance.