What this covers
- Fonts are normally embedded inside the PDF, which is why it is portable
- An unembedded font is substituted, and substitution shifts the layout
- Symbol and mathematical fonts fail worst - often as boxes
- The fix is at the source: re-export with embedding turned on
The entire proposition of the PDF format is that the page looks the same everywhere. When a colleague opens your document and the lines break differently, something has broken that promise, and it is nearly always the same thing.
What embedding means
A well-made PDF carries the fonts it uses inside the file, usually subsetted down to only the characters actually used. That is a large part of why a PDF is bigger than the text it contains, and it is the whole reason the format is portable.
When a font is not embedded, the file names it and assumes the reader will have it. If the reader does, nothing goes wrong. If it does not, it substitutes - picking the closest thing it has by style classification and metrics.
Why substitution shifts the layout
Every typeface gives every character a slightly different width. A substituted font with wider characters pushes text further along each line, which changes where the line breaks fall, which changes where the next line starts, and the divergence accumulates down the page.
On a short document you get slightly odd spacing. On a long one, a paragraph that ended cleanly at the foot of page three now runs two lines onto page four, and every subsequent page is off. This is why 'it looks a bit different' and 'my document is now 41 pages instead of 40' are the same problem.
Symbol fonts fail hardest
Text fonts substitute imperfectly. Symbol, mathematical and dingbat fonts substitute catastrophically, because there is no sensible nearest match. The classic result is a page of empty boxes where the equations were - each box is the reader saying it has no glyph for this character code.
Diagnosing it
Two minutes.
- Check the document properties
Most readers list the fonts used and state, per font, whether it is embedded. A font marked as not embedded on a document that looks wrong elsewhere is your answer.
- Look for shifted line breaks
Compare the same paragraph on two machines. If the words are the same but break in different places, it is a font, not a rendering setting.
- Look for boxes or question marks
Missing glyphs are unambiguous. Nothing else produces them.
- Check the page count
If the two machines disagree about how many pages the document has, the text has reflowed because of substitution.
Symptom to cause
Three different problems that get described the same way.
| Symptom | Cause | Fix |
|---|---|---|
| Line breaks differ between machines | Unembedded font, substituted | Re-export with embedding |
| Boxes or question marks where symbols should be | Unembedded symbol font, no substitute | Re-export with embedding |
| Text is the right shape but slightly blurry | Rendering settings, not a font problem | Nothing; it prints correctly |
| Everything is proportionally smaller on paper | Print scaling, not a font problem | Set the print scale to 100 per cent |
Fixing it
Properly, at the source: re-export the document from whatever produced it, with font embedding enabled. Every serious export dialogue has the option, usually under an advanced or a PDF settings panel, and the default in modern software is to embed.
Documents that arrive without embedding are typically old, produced by a minimal PDF writer, or exported with a setting someone chose deliberately to save space - which saves a few tens of kilobytes and costs the document its portability.
When you cannot re-export
If the document is not yours and the source is unavailable, the options are worse but they exist. Rendering the pages to images fixes the appearance permanently, because an image cannot substitute anything - at the cost of losing the text layer entirely, so the document stops being searchable.
That is a reasonable trade for a one-page handout you need to look right, and a bad one for anything you will work from. Usually the better answer is to accept the substitution and check the content rather than the layout.
Working around it
What embedding costs
- A subsetted text font
- 10 to 60 KB
- A full font, not subsetted
- 100 KB to several MB
- Typical document with three embedded fonts
- Around 100 KB of font data
- What you get for it
- The document looks identical everywhere
Before sending a document out
- Check the properties panel lists every font as embedded
- Open it on a second machine if the layout matters
- Check the page count matches
- Look specifically at any equations or symbols
- Re-export rather than working around it, where you can
Questions and answers
How do I check whether fonts are embedded?
Open the document properties in most readers and look at the fonts tab. It lists every font used and states whether each is embedded, and usually whether it is a subset.
Why does my document look fine on my computer?
Because you have the font installed. The reader uses your local copy and renders correctly. Anyone without that font sees a substitute.
Can I embed fonts into an existing PDF?
Some professional tools can, with mixed results - the original outlines are not in the file, so it is a reconstruction. Re-exporting from the source is far more reliable.
Is this why my document has a different number of pages on another machine?
Yes. Substitution changes character widths, which changes line breaks, which accumulates until a paragraph spills onto an extra page.