SmartArt · Typography
PowerPoint kerns SmartArt text with a 1990s table
Getting SmartArt text to fit like it does in PowerPoint came down to one rule I never found written anywhere. Kerning starts at 12 pt, and it uses the font's old kern table.
SmartArt shrinks its text until it fits the shape. That sounds simple, until your idea of how wide a word is differs from PowerPoint's by a few percent. Then PowerPoint picks 18 pt, you pick 17, and the whole drawing looks off.
So before touching any more layout logic, I want to know exactly how wide PowerPoint thinks a word is.
Asking PowerPoint
This weekend I had PowerPoint measure 1,829 words and lines for me: widths with and without kerning, where each line breaks, how tall the box ends up. Then I measured the same words with my own code.
Without kerning, my widths are within 0.03% of PowerPoint's on average. So the font metrics are fine. Every difference is in the kerning, the little nudges between letter pairs like T and e.
Fonts carry kerning twice
A modern font usually has two sets of kerning:
- the old
kerntable, from the early TrueType days - GPOS pairs, the newer OpenType version, which is what browsers use
Aptos, Office's new default font, has 11,093 pairs in its old table (Te, Tr, La, ke, re and so on). GPOS adds more on top, like Pl, Sc, Be and An.
PowerPoint only reads the old table. You can see it with single words:
| Word | Kerned vs. plain | Why |
|---|---|---|
| Test | 5% narrower | Te is in the old table |
| Train | 3.5% narrower | Tr is in the old table |
| Plan | same width | Pl is only in GPOS |
Kerned (orange) over plain. Your browser kerns with GPOS, so it tightens "Pl" too. PowerPoint wouldn't.
And it only kicks in at 12 pt. Below that, SmartArt text isn't kerned at all.
Why the browser can't just do it
The browser kerns with GPOS, so it squeezes Pl and Sc as well. Text comes out slightly narrower than in PowerPoint, and fits one point bigger. Close isn't good enough here, because PowerPoint picks the size with a search that flips on tiny margins.
So I read the old table straight out of the font file and apply only those pairs, from 12 pt up. Same as PowerPoint.
Office uses exactly the room it says
With the widths right, line breaks fall into place as well. I went through more than 22,000 line breaks in Office's own PDFs. The fullest line Office keeps uses 1.00000 of the available width. The emptiest one it refuses would have used 0.99993. No hidden padding, no slack. Just the box described in the file.
The rule was never fuzzy. My measurements were.
What it changes
On PowerPoint's SmartArt gallery, the number of paragraphs coming out a point off went from 81 to 51 today. In Word, from 31 to 22.