PDF Font Subsetting

PDF font subsetting is the practice of embedding only the glyphs (character shapes) actually used in a document, rather than the complete font file with all thousands of glyphs. A font subsetting operation strips out all glyphs not used in the document — reducing embedded font size dramatically for documents that use only a small portion of a typeface's full character set.

Subset fonts are identified by a 6-character uppercase tag prefix in their BaseFont name, separated by a plus sign: for example, <code>ABCDEF+Arial</code> or <code>XYZQPR+HelveticaNeue-Bold</code>. The 6-character tag is arbitrary (Adobe specifications say it should be randomly generated); its purpose is to distinguish the subset from the full font and from other subsets of the same typeface.

How font subsetting works

Font subsetting is performed by the PDF export engine at document creation time:

1. The PDF generator tracks every glyph (character) placed on the page during document creation. 2. After all content is placed, the subset glyph set is determined — typically the set of all glyphs that appear at least once in the document. 3. The font program (TrueType binary, CFF program, or Type 1 charstrings) is trimmed to include only the subset glyphs and necessary supporting data. 4. The trimmed font program is embedded in the PDF as a /FontFile, /FontFile2, or /FontFile3 stream. 5. The BaseFont name is prefixed with the 6-character tag to identify it as a subset.

<strong>Subsetting efficiency</strong> — For a document using 80 characters of a typeface with 3,000 glyphs, subsetting reduces the embedded font from ~500KB to ~30–50KB. This is the dominant font-related file size reduction technique — more impactful than font compression alone.

<strong>What gets stripped</strong> — In TrueType subsetting, unused glyph records are removed from the glyf table; unused entries are cleared from the cmap table; hmtx widths for unused glyphs may be zeroed; name table and other metadata are typically preserved. The resulting font can render all the characters present in the document but cannot render any other characters.

<strong>Subsetting and the /Widths array</strong> — The PDF font dictionary's /Widths array (mapping character codes to advance widths) reflects only the characters in the document's encoding — /FirstChar to /LastChar. For subset fonts, this array may cover only the specific character codes used.

Subsetting and text extraction

Font subsetting has important implications for text extraction and document reuse:

<strong>ToUnicode CMaps survive subsetting</strong> — A well-formed subset font retains its /ToUnicode CMap in the font dictionary. Text extraction tools use the ToUnicode CMap to map character codes to Unicode values — this mapping is based on the codes used in the document, not the glyph count. Subsetting does not affect text extractability if ToUnicode is correctly generated.

<strong>Re-embedding subset fonts</strong> — A subset font cannot be used to render any characters not present in the original document. This is significant for: PDF editing (adding new text in the same typeface requires re-subsetting or using the full font), form filling (a subset font for a completed form may not cover characters a user enters), and PDF merging (merging PDFs with different subsets of the same font produces multiple font copies).

<strong>De-duplication on merge</strong> — When merging PDFs that each contain a subset of the same typeface (ABCDEF+Arial and GHIJKL+Arial), merge tools typically cannot automatically merge these into a single subset because the 6-character prefix designates them as different fonts. Advanced PDF optimisation tools can identify shared typefaces (by matching font metrics and sample glyphs) and merge their subsets, but this is not standard behaviour.

<strong>PDF/A and subsetting</strong> — PDF/A requires all fonts to be fully embedded — subsetting satisfies this requirement, as a subset is considered a form of embedded font. PDF/A does not require full (unsub-setted) font embedding. In practice, virtually all PDF/A documents use subset fonts.

Subsetting vs non-subsetting trade-offs

<strong>When subsetting is beneficial:</strong> - Almost always — subsetting reduces file size substantially for any font with more glyphs than the document uses - Essential for CJK fonts — a full CJK TrueType font can be 10–20MB; subsetting to the used characters typically produces a 50–200KB font program - Distribution PDFs — smaller files transfer and open faster

<strong>When full embedding without subsetting may be preferred:</strong> - Forms intended for user completion — if the document will be edited after export and new characters entered, the full font is necessary to render those characters - Documents subject to programmatic text addition — server-side stamp operations, watermark addition, or any workflow that adds text to the PDF after initial generation - Font licence compliance — some font licences prohibit subsetting; always check font licence terms

<strong>How to detect subset fonts</strong> — In Adobe Acrobat, File > Properties > Fonts tab shows all fonts with "(Embedded Subset)" notation for subset fonts and "(Embedded)" for fully embedded fonts. Command-line: <code>pdffonts document.pdf</code> (Poppler utility) shows all fonts with emb/sub/uni columns (embedded/subset/ToUnicode). See <a href="/news/pdf-fonts-guide" target="_blank" rel="noopener">PDF Fonts Guide</a> for the complete font inspection workflow.

Frequently asked questions

Can I add text to a PDF if its fonts are subset-embedded?

You can add text using the same typeface only if the characters you need are already in the subset — or if you have access to the original font file to create a new subset that includes additional characters. When you add text in a PDF editor: (1) If the new characters are in the existing subset, the editor can reference the existing font. (2) If the new characters are not in the subset, the editor must either embed additional glyphs (requiring the original font file) or substitute a different font. Most consumer PDF editors handle this by embedding a new font alongside the subset — resulting in two fonts in the document. Professional tools like Acrobat Pro with the original font installed can expand the subset to include new characters.

What does "Embedded Subset" vs "Embedded" mean in Acrobat's font list?

"Embedded Subset" (shown as "Embedded Subset" in Acrobat's File > Properties > Fonts panel) indicates that the font is subset-embedded: only the glyphs used in the document are present. "(Embedded)" without "Subset" indicates full font embedding — the entire font program with all glyphs is embedded. Neither notation indicates whether the font has a /ToUnicode CMap (needed for text extraction). A third state, "(Not Embedded)" or no parenthetical, indicates the font is referenced by name only — the PDF relies on the viewing system having the font installed. PDF/A requires all fonts to be at least subset-embedded.

Does font subsetting affect accessibility?

Font subsetting does not directly affect accessibility — accessibility is determined by the presence of a /ToUnicode CMap and proper structure tags, not by whether the font is subsetted. A subset font with a correct /ToUnicode CMap is fully text-extractable. The indirect risk: some PDF generation tools that produce poor ToUnicode mappings also produce poor subset fonts — the problems appear together but subsetting itself is not the cause. The PDF/UA requirement for text accessibility is satisfied by complete ToUnicode coverage for all characters in the document, which a correctly subsetted font with ToUnicode provides.