Skip to content
Latchkey

What Is a Web Font Subset? Shipping Only the Glyphs You Need

A web font subset is a font file trimmed to contain only the characters your site actually uses, dramatically reducing the download size.

A full font can include thousands of glyphs for many languages and symbols, but most sites use only a fraction of them. Subsetting strips a font down to the characters you need, cutting the file size and speeding text rendering. It is a build-time optimization with a real effect on load metrics, and it runs as part of your asset pipeline.

Why fonts are heavy

A complete font supports many scripts, weights, and symbols, which makes the file large. Most sites only need a single language and a couple of weights, so most of that data is wasted bandwidth.

How subsetting works

A subsetting tool keeps only the glyphs for the characters and unicode ranges you specify and discards the rest. The result is a smaller font that renders the text your site shows while dropping unused glyphs.

Static versus dynamic subsetting

  • Static subsetting trims to a fixed character set at build time.
  • Unicode-range splits a font into per-language files loaded on demand.
  • Self-hosting subset fonts avoids extra third-party requests.

The risk of over-trimming

If you subset too aggressively and a needed character is missing, it renders as a fallback glyph or a box. Subsetting must cover all characters the site can display, including dynamic content, which is why ranges are safer than exact character lists for user-generated text.

Web font subsets in CI/CD

The build subsets and self-hosts the fonts, emitting content-hashed font files cached long-term at the CDN. Doing it in the pipeline keeps the subset consistent with the deploy, and pinning the subsetting inputs keeps the emitted font files reproducible across CI runs.

Key takeaways

  • A web font subset keeps only the glyphs your site uses, shrinking the file.
  • Unicode-range subsetting is safer for dynamic or multilingual text.
  • CI subsets and hashes fonts so they cache long-term and stay reproducible.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →