How to edit a PDF in the same font (and why editors get it wrong)
blupdf Team · 2026-08-27 · 4 min read
You change one word in a PDF and the whole line suddenly looks like it was typed by someone else. Slightly heavier, slightly wider, the wrong g. Nothing is technically broken — but everyone can see it was edited. This post explains where that comes from and how to edit a PDF in the same font so the change is invisible.
How fonts live inside a PDF
A PDF can reference a font in three ways, and which one you have decides how editable the text really is:
- Fully embedded. The complete font program is inside the file. Any character can be rendered exactly as the designer intended. Common in PDFs from design tools and many office exports.
- Subset embedded. Only the glyphs actually used in the document are included — if the word "zebra" never appears, there is no z. This is the default for most exporters because it keeps files small. It is also the source of most editing surprises: you type a character the subset does not have, and the editor has to get it from somewhere else.
- Referenced, not embedded. The PDF only names the font ("Helvetica", "Times") and expects the viewer to have it. Base-14 fonts like these are usually fine; anything else silently becomes whatever the viewer substitutes.
Why substitution looks wrong
When an editor cannot use the original font it picks a stand-in, and the differences that make a stand-in look wrong are small but systematic:
- Metrics. Character widths differ, so a substituted line is longer or shorter and wraps differently.
- Weight. "Regular" in one family is visibly darker than in another.
- x-height. Lowercase letters in the substitute sit taller or shorter, which the eye reads instantly as a different typeface even at 9 pt.
- Letterforms. The single-storey vs double-storey g and a, the shape of the terminals on t and f.
Lay a substituted word next to the original and each difference is tiny; together they are unmistakable.
What "same font" means when only a subset is embedded
With a subset font, an editor has the exact letterforms for every character that already appears in the document — and none for the ones that do not. Editing "Invoice 2025" to "Invoice 2026" works perfectly if the document contains a 6 somewhere; if it does not, the 6 has to come from a matching font. A careful editor uses the embedded subset for every glyph it has and falls back to a close match only for the missing ones, so at worst a single character is approximated rather than the whole word.
How blupdf matches fonts
blupdf follows exactly that order:
- Embedded font first. If the glyph exists in the embedded font (full or subset), it is rendered with it — identical to the original.
- Library match for missing glyphs. For characters the subset lacks, or for fonts that were never embedded, blupdf classifies the original (serif/sans/slab/mono, weight, width, x-height, spacing) and renders with the nearest font in its library, sized so the line length stays as close as possible to the original.
- Scans. On a scanned page there is no font at all, so the whole block uses the library match, estimated from the glyph images. See How to edit a scanned PDF.
The block toolbar shows which case applies, and you can override the match from a list if you know the original typeface. Details are in Editing text.
Checking the result
Before exporting, zoom the edited line to 200% and compare it with an untouched line in the same paragraph. Look at three things: the overall darkness of the text, the height of the lowercase letters, and the length of the line. If all three match, nobody will notice the edit at reading size. If the line runs long, reduce the size by half a point from the toolbar rather than accepting an extra wrapped line.
When you should use the source file instead
Font matching solves the "I only have the PDF" problem. If you still have the original Word, InDesign or Google Docs file and the change is more than a few lines, edit the source and export a fresh PDF — it will always be exact. A PDF editor is the right tool when the source is gone, when the document came from someone else, or when the fix is small and the turnaround matters.
FAQ
Can any editor keep the exact font?
Only when the font is embedded and contains the glyphs you need. No editor can extract a font that is not in the file; the honest answer for the rest is "closest match", and the quality of that match is what separates editors.
Is it legal to reuse an embedded font?
Rendering text with a font embedded in a document you are editing is what PDF embedding is for. blupdf does not let you extract fonts from a PDF for use elsewhere.
Does blupdf change the fonts of text I did not edit?
No. Untouched text is left exactly as it was in the file, byte for byte.