Sub topic 4
Metrics, Optical, and Manual Kerning
This chapter assumes you know the basics from the earlier chapters: advance widths, sidebearings, what a kerning pair is, and how kerning differs from tracking. It also assumes you have used a design tool such as InDesign, Illustrator, or Figma, or have written basic CSS.
Kerning has three sources, and they can stack. The first is the pair data the type designer built into the font. The second is an algorithm in your software that measures glyph shapes. The third is a number you type for one spot in one document. Knowing which source is active tells you why two apps render the same text differently and which one to change.
The three methods at a glance
- Metrics kerning reads the kerning pairs stored in the font and applies them.
- Optical kerning ignores those pairs. The software measures the shapes of adjacent glyphs and spaces them so the gaps look even.
- Manual kerning is a value you set between two specific letters. It is stored in your document, not in the font.
Metrics kerning
Metrics kerning is the default in nearly every tool. In OpenType fonts the pair values usually sit in the GPOS table under the kern feature. Older fonts use a legacy kern table. Each entry names two glyphs, or two classes of glyphs, and an adjustment in font units. Most modern fonts use 1000 or 2048 units per em.
For the pair A + V, a font might store -80 in a 1000-unit font. The software moves V left by 0.08 em, so the pair sits closer together than the sidebearings alone would place it.
Metrics kerning has these strengths:
- It is fast and predictable, and every app that reads the font produces the same result.
- It reflects the type designer's judgment, which was made while looking at that exact design.
- It travels with the font file. A web page, a PDF, and a layout all use the same pairs.
It also has weaknesses:
- Quality depends on the font. A professionally made family may have thousands of pairs and classes. A free or auto-generated font may have few or none, and you will see gaps in pairs such as
To,Ty, orr.. - It cannot adapt. The pairs were tuned for one font at, usually, a text size. They do not know that you set a swash capital next to a lowercase letter from another family.
Optical kerning
Optical kerning is an algorithm in the application. In InDesign and Illustrator you choose Optical in the kerning menu. The program looks at the outline of each glyph at its edges, estimates how much white space the pair creates, and adjusts the gap so the spaces look equal. It does not read the font's kerning pairs.
Optical kerning is useful in three cases:
- The font has weak or missing kerning data.
- You mix fonts or sizes on one line, such as a large initial followed by small text. A pair table for a single font cannot cover that.
- You need a quick, reasonable first pass on display text before manual work.
It has its own failure modes:
- It can override good work. A well-kerned font may look worse under Optical, because the algorithm cannot know the designer's intent. It also tends to be less sensitive around punctuation, figures, and unusual shapes.
- It is a feature of the layout program. If you hand the file to someone using other software, or export the text to the web, the spacing may not follow. CSS has no optical kerning mode.
- It acts on every pair, so you cannot easily inspect or edit what it did.
Optical is not "better" than metrics. They are two different sources of the same adjustment, and you choose between them per text range.
Manual kerning
Manual kerning is a number you place between two characters. It is measured in thousandths of an em (the same unit used for tracking), so it scales with the font size. A value of -50 at 40 pt moves the second letter left by 2 pt. At 80 pt, the same -50 moves it by 4 pt.
In InDesign and Illustrator you click between two letters. You then use Alt/Option + Left or Right arrow, or type a value in the kerning field. The default step is 20 units, and you can change it in the preferences. Manual kerning is added to the base mode (metrics or optical). In InDesign, typing 0 at a pair removes the automatic kerning there, which is useful when a pair is wrongly tight.
Manual kerning is the right tool for:
- Logos, wordmarks, and large headlines, where one uneven gap is obvious.
- Fixing a specific pair that automatic kerning gets wrong.
- Pairs involving punctuation, quotation marks, or numerals.
It is the wrong tool for body copy. Kerning a long paragraph by hand is slow, and a later edit or reflow can leave your adjustments next to the wrong letters.
Do manual kerning last
Manual kerning interacts with other settings, so the order matters:
- Choose the font, size, and weight.
- Set the automatic mode (metrics or optical).
- Set tracking for the whole run.
- Kern the individual pairs that still look wrong.
If you kern first and then change the tracking, the balance you worked out shifts. If you change the font size by a large factor later, check again, because optical judgments differ between a headline and a caption.
Comparing the methods
| Aspect | Metrics | Optical | Manual |
|---|---|---|---|
| Source of values | Pair table in the font | Software analysis of glyph shapes | Number you type |
| Scope | Every pair in the font | Every pair in the text range | One pair at a time |
| Portable to the web | Yes, through `font-kerning` | No | Only by re-creating it in CSS |
| Best for | Most text, good fonts | Poorly kerned or mixed fonts | Logos, headlines, fixes |
| Main risk | Weak pair data | Overrides the designer's work | Breaks on edit or reflow |
Kerning in CSS
Browsers use metrics kerning. There is no optical option. The font-kerning property controls whether the font's pairs are used, and font-feature-settings can address the kern feature directly.
body {
font-kerning: normal;
}
.no-pairs {
font-kerning: none;
}
.also-no-pairs {
font-feature-settings: "kern" 0;
}font-kerning: auto lets the browser decide. Browsers may skip kerning on very small text for speed, though current engines mostly apply it everywhere. Setting normal removes the guesswork. Disabling kerning is rarely a good idea except for comparison, for monospaced text, or when you test how much a font depends on its pairs.
Manual kerning in CSS is done with letter-spacing on a wrapped letter. The value is applied after the character it styles, so you wrap the first letter of the pair. The function below does that for a map of pairs. It uses Array.from so characters outside the Basic Multilingual Plane are not split in half.
function kernPairs(element, pairs) {
const chars = Array.from(element.textContent);
element.textContent = "";
chars.forEach((ch, i) => {
const pair = ch + (chars[i + 1] ?? "");
if (pair in pairs) {
const span = document.createElement("span");
span.textContent = ch;
span.style.letterSpacing = pairs[pair] + "em";
element.append(span);
} else {
element.append(ch);
}
});
}
kernPairs(document.querySelector(".logo"), { AV: -0.08, Yo: -0.04 });This fixes spacing at the pair level, but it has gotchas:
- Letter-spacing with a non-zero value disables optional ligatures in browsers, so a wrapped
fbeforeiwill not formfi. - Whether the browser applies the font's own kerning across an element boundary varies by engine. The wrapped pair may lose its built-in kern or keep it, so always check the result in each browser you support.
- The text now contains extra elements. Screen readers usually read it normally, but selection and search can behave oddly. For a logo, an SVG with outlined text avoids all of this.
A practical decision process
- Start with metrics kerning and check a few hard pairs:
AV,To,Ty,rn,LT, and a quote mark next to a capital. - If many pairs look wrong across the whole font, the pair data is weak. Try Optical in your design tool, or choose a better font.
- If you mix families or sizes on one line, use Optical, or kern the join by hand.
- Set tracking for the whole run.
- Fix the remaining pairs by hand, starting with the largest text.
- Zoom out, squint, and look at the rhythm again. Visual checks are covered in a later chapter.
Exercise
A headline in a font with very sparse kerning data shows a large gap between "T" and "o". The headline is fixed text that will never change. Which approach fits best, and why would you avoid applying a manual value to the whole paragraph below it?
Show answer
Keep metrics or switch the headline to Optical, then manually kern the "To" pair with a negative value in thousandths of an em, because the headline is large and fixed, so a one-off adjustment is stable. Avoid manual values in the body paragraph because they are slow to apply, and any edit or reflow can leave the adjustments next to different letters.
Exercise
You kern a pair at -60 in a 24 pt line. Later the same text is scaled to 72 pt. Does the adjustment need to change, and what is its size in points at each size?
Show answer
The value stays -60 because the unit is thousandths of an em and scales with the font size. At 24 pt it moves the letter by 0.06 × 24 = 1.44 pt, and at 72 pt by 0.06 × 72 = 4.32 pt. You should still look at the result, since the right amount may differ between sizes.