Webfont Subsetter (WOFF & TTF)
Shrink a font to the characters your site uses and get a WOFF file with its CSS unicode-range.
How it works
Upload a TrueType font (TTF or WOFF) and keep only the characters you need: type them, paste a page's text, add Unicode ranges or tick common blocks. Variable fonts can be frozen at one weight. You get a WOFF 1.0 or TTF file with kerning kept as a kern table, the size saving and a ready @font-face rule with unicode-range.
- The requested code points are the characters of the text, the ranges and the ticked blocks (tab and line breaks ignored). Glyphs are kept for every code point the font maps, plus .notdef and all components of composite glyphs; glyph ids are renumbered densely.
- The subset keeps head, hhea, maxp, hmtx, loca, glyf, a new cmap (formats 4 and 12), post 3.0, name, OS/2 and hinting tables. GSUB, GPOS, GDEF and variation tables are dropped. With axis values the outlines and advances of that instance are baked in (gvar applied, composites flattened) and OS/2 weight follows wght.
- Kerning: for subsets up to 400 glyphs every pair runs through the font's own GPOS kern lookups (class kerning included) and the non-zero values go into a legacy kern table (format 0, up to 10900 pairs), which browsers apply when GPOS is absent. Frozen variable instances use the pair list at that location.
- WOFF 1.0: each table is zlib-compressed when that makes it smaller and 4-byte aligned, with the original checksums; the file is unpacked again and must give the subset font byte for byte. WOFF2 needs a Brotli encoder, which this platform does not have in pure TypeScript, so WOFF2 is not offered.
Check the font's license before publishing a subset: some licenses forbid modification or reserve the font name. Ligatures, alternates and mark positioning are not kept. CFF (PostScript-outline) fonts are not supported.
Sources
Part of Lumina
-
Lumina Photo editor & image toolkit
Bring out what you saw. A free photo studio, right in your browser.
Related tools
- Font File Inspector & Glyph Coverage – Read TTF, OTF and WOFF names, tables, metrics, axes, kerning and Unicode coverage.
- OpenType Feature Playground – See which OpenType features and variable axes a font has, and what they do to your text.
- TrueType & Variable Font Builder – Turn glyph outlines or a grid font into a verified TTF, including variable weight fonts.
How to use the Webfont Subsetter (WOFF & TTF)
Shrink a TrueType font to the characters your website really uses and get a WOFF 1.0 or TTF file with kerning kept and a ready @font-face rule.
What it is for
A full font file often weighs hundreds of kilobytes because it covers many languages. If your site only shows English and German text, most of those glyphs are never used but still slow down the first page load. The subsetter keeps only the glyphs for the characters you choose and packs them as WOFF 1.0 (compressed, supported by every current browser) or plain TTF.
You can type the characters, paste a page's text, add Unicode ranges or tick common blocks such as Basic Latin. Variable fonts can be frozen at one weight, which turns them into a smaller static font. Lumina's Type Lab → Glyph Lab subsets on your device with the same engine.
Worked example
We uploaded Noto Sans Regular (431,364 bytes, 3,884 glyphs), typed "Grüße aus Köln – 12,50 €", ticked Basic Latin and kept WOFF 1.0 with kerning.
- NotoSans-Regular-subset.woff: 9,124 bytes, 97.9 % smaller.
- Glyphs kept: 102 (all printable ASCII plus ß, ö, ü, the en dash and €,
.notdefand the parts of composite glyphs). - Kerning pairs: 345, computed with the font's own GPOS kerning and stored as a kern table.
- Tables left out: GDEF, GPOS and GSUB.
- The
@font-facerule ends withunicode-range: U+20-7E, U+DF, U+F6, U+FC, U+2013, U+20AC;.
How to read the result
- File size, Original size and Saved show the gain; Glyphs kept includes
.notdefand any components of composite glyphs (an "é" built from "e" and an accent keeps both). - An info note lists requested characters the font simply does not have.
- @font-face rule is ready to paste; the
unicode-rangetells browsers to download this file only when a page uses one of those characters, so you can split a font into several subsets. - Tables left out names what the subset drops. GSUB (ligatures, small caps, alternates) and GPOS mark positioning are not kept; pair kerning is converted into a classic kern table, which browsers apply when GPOS is absent.
Tips and common mistakes
- Paste the real text of your pages rather than guessing: every character counts, including dashes, quotes, the euro sign and non-breaking spaces.
- If your design relies on ligatures, small caps or stylistic sets, keep the full font for that text — the subset renders plain glyphs.
- Freeze a variable font at
wght=700bakes the bold instance into the outlines; the result has no axes any more. - Only TrueType-outline fonts (
glyf) are supported. CFF.otffonts are refused with a clear message. - WOFF2 is not offered: it needs a Brotli compressor that this platform does not have in pure TypeScript.
FAQ
Am I allowed to subset a font?
It depends on the license. Open-source fonts under the SIL Open Font License allow it, but a subset counts as a modified version; when the license reserves the font name, give your subset a different family name before publishing. Commercial licenses may forbid modification entirely. The tool warns when the license text mentions a reserved font name or when the embedding flags are restricted.
Is kerning exactly the same as in the original?
For subsets of up to 400 glyphs, every pair is run through the original GPOS kerning, so values match the original for those glyphs (the A–V pair reads back with the same value). Larger subsets and frozen variable instances use the font's pair list.
Can I check the result?
Open the subset in the OpenType Feature Playground or the Font File Inspector; both read WOFF 1.0 and list the remaining tables and characters.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://luminafontsubset.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminafontsubset.usefulweb.app/mcp· tool namelumina_font_subset
Example request
curl -s -X POST https://luminafontsubset.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'