What Is Font Subsetting?
Font subsetting is the process of creating a smaller font file that contains only the characters you need — rather than the full character set (which can include thousands of glyphs for multiple languages).
A full Latin font file might be 80 KB. Subset to basic Latin characters (A–Z, a–z, 0–9, common punctuation), it can drop to 15–20 KB.
Why Subset?
Performance
Font files block rendering. Smaller files mean:
- Faster First Contentful Paint (FCP)
- Reduced bandwidth — especially important for mobile users
- Better Core Web Vitals scores
Practical Impact
| Page | Full Font | Subset Font | Savings |
|---|---|---|---|
| English blog | 75 KB | 18 KB | 76% |
| E-commerce (product names + prices) | 75 KB | 12 KB | 84% |
| Multilingual site (EN + DE) | 75 KB | 35 KB | 53% |
How to Subset Fonts
Tools
- glyphhanger — command-line tool for determining needed characters and generating subsets
- fonttools (pyftsubset) — Python-based subsetting with fine-grained control
- Google Fonts — offers a "charsets" parameter in the CDN URL to request subsets
- Font Squirrel Webfont Generator — browser-based tool with subsetting options
Google Fonts CDN Example
Instead of loading the entire character set:
https://fonts.googleapis.com/css2?family=Inter
Request only Latin characters:
https://fonts.googleapis.com/css2?family=Inter&subset=latin
Google handles subsetting server-side — no manual file manipulation needed.
Licensing Implications
This is where subsetting gets legally nuanced:
Open-Source Fonts (OFL, Apache, MIT)
Subsetting is explicitly permitted. Modify, subset, and convert freely — just follow the license's reserved name and attribution rules.
Commercial Font Licenses
Rules vary by vendor:
- Some EULAs explicitly allow subsetting for web use
- Some require you to use the vendor's pre-subset web font files — converting yourself is prohibited
- Some prohibit any modification of the font file, which includes subsetting
- Adobe Fonts provides pre-optimized files via their CDN — manual subsetting of Adobe font files violates terms
Always check your EULA before subsetting a commercial font.
Self-Hosting Subset Fonts
If you subset and self-host:
- Ensure your license permits self-hosting (not all web licenses do)
- Ensure your license permits modification/subsetting
- Keep the original license file alongside the subset
- Do not subset beyond what your content requires — but include all characters you might need (accents, currency symbols, etc.)
Best Practices
- Audit first — use FontScanner to identify all fonts and their sources before subsetting
- Subset per page type if your site serves very different content (blog vs. checkout)
- Include a buffer — add characters for user-generated content, search queries, and dynamic data
- Test thoroughly — missing glyphs render as tofu (□) boxes
- Use WOFF2 — combine subsetting with WOFF2 compression for maximum savings
Conclusion
Font subsetting is one of the most effective web performance optimizations available — but for commercial fonts, verify your license first. For open-source fonts, subset aggressively and enjoy the speed gains.