Sub topic 10
Spacing by Size and Case: Headlines, Body Text, and All Caps
This chapter assumes you know what kerning and tracking are, that tracking is measured in thousandths of an em, and that CSS letter-spacing takes em values. It covers how to choose spacing for three common situations: large display text, running body text, and small all-caps labels.
Why size and case change the spacing you need
A font's default spacing is a compromise. The designer fixes the sidebearings and kerning pairs so the font looks acceptable across many sizes, usually somewhere in the text range of roughly 9 to 14 points. The same gaps look different at other sizes, because the eye reads gaps in proportion to letter size, and small type and large type are viewed under different conditions.
- At large sizes, the gaps scale up with the letters. A gap that looked normal at 16px looks loose at 64px, because the letters are now large, strokes are heavy, and every flaw in the spacing is easy to see.
- At small sizes, letters are tiny on screen or paper. Counters (the enclosed or partly enclosed spaces inside letters) fill in, and neighboring letters can seem to touch. Slightly more room helps legibility.
- Case changes the shape of the line. Lowercase letters have ascenders, descenders, and varied widths, which create a natural rhythm. Capitals are uniform in height and have flat, vertical sides, so default gaps look tight and uneven.
The sections below turn these observations into starting values. Treat every number as a starting point to be checked by eye, not a rule.
Headlines and display text
Large text usually looks best slightly tightened. A common starting range for headlines is -0.01em to -0.03em, which is -10 to -30 in design-tool units. The bigger the text and the heavier the weight, the more tightening it tolerates.
.headline {
font-size: 4rem;
letter-spacing: -0.02em;
}Because the value is in em, it scales with the element's font-size. If you change the headline to 6rem, the tightening grows in proportion, and you do not have to recalculate it.
Two cautions apply to display text:
- Tracking does not fix bad pairs. If a headline has an obviously awkward pair such as "Ty" or "AV" after tracking, adjust that pair by hand with kerning. Uniform tracking moves every pair by the same amount, so it can make a good pair too tight while repairing a bad one.
- Do not tighten until letters collide. Check the tightest points, such as "rn", "ri", and "il". Tight tracking can make "rn" look like "m".
Very large type, such as a poster headline at 200px, is where default kerning is most visible. Look at it with extra care and expect to kern individual pairs manually.
Body text
Body text is read in long runs, so the goal is an even, unobtrusive rhythm. For most well-made text fonts, leave tracking at 0 and let the built-in sidebearings and kerning do the work. Kerning should stay on.
Small adjustments are sometimes justified:
- Text below about 12px, or a font with tight default spacing, can gain a little room, around 0.005em to 0.02em.
- Fonts designed for display use, when pressed into body duty, often need a small positive value.
- Fonts designed for small sizes, sometimes called "text" or "caption" optical sizes, already include extra space. Adding tracking to them double-counts the correction.
Never track out lowercase body text in order to make it look "airy" or "premium". Lowercase relies on tight, even word shapes. When you open the gaps between letters, the gaps between letters start to compete with the gaps between words, and the eye has a harder time finding word boundaries. Reading becomes slower and the text color (the overall gray value of a block of text) turns spotty.
body {
font-size: 1rem;
font-kerning: normal;
letter-spacing: 0;
}
.caption {
font-size: 0.75rem;
letter-spacing: 0.01em;
}All caps and small labels
Capital letters need extra space. In running text, lowercase letters are designed to sit close together. Capitals are designed to start sentences and names, so their default spacing assumes they will appear next to lowercase letters. When you set a whole word in capitals, the default gaps look tight, and the gaps between straight-sided letters such as "H", "I", and "N" look different from gaps next to round letters such as "O" and "C".
Opening the tracking evens this out. Typical values run from 0.05em to 0.15em for small all-caps labels, with 0.08em to 0.12em the most common range.
.eyebrow {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.12em;
}The same advice applies to small caps, the capital-shaped letters drawn at lowercase height. They need a smaller increase, often 0.03em to 0.08em, because the letters are already designed to sit more openly.
Large all-caps headlines are a mixed case. They need more room than the same text in lowercase, but they are also large, which pulls the other way. In practice the result is close to neutral: try values between 0 and 0.04em and judge by eye.
Trailing space and centering
CSS applies letter-spacing after every character, including the last one. A tracked, centered label therefore looks shifted slightly to the left, because the invisible space after the final letter takes up room on the right. One common workaround is a negative right margin equal to the tracking value.
.label {
text-align: center;
text-transform: uppercase;
letter-spacing: 0.1em;
margin-right: -0.1em;
}Check this in your target browsers. Browsers have differed in how they handle the trailing space, and the CSS specification allows implementations to vary.
Quick reference
The ranges below are starting points. The right value depends on the typeface, weight, and size.
| Situation | Typical tracking (em) | Design-tool units | Notes |
|---|---|---|---|
| Large headline, lowercase or mixed case | -0.01 to -0.03 | -10 to -30 | Check "rn", "ri", and awkward pairs |
| Body text, 14 to 20px | 0 | 0 | Leave alone with a good text font |
| Small body or caption, below 12px | 0.005 to 0.02 | 5 to 20 | Small gains only |
| Small caps | 0.03 to 0.08 | 30 to 80 | Less than full capitals |
| Small all-caps label | 0.05 to 0.15 | 50 to 150 | Usually 0.08 to 0.12 |
| Large all-caps headline | 0 to 0.04 | 0 to 40 | Judge by eye |
How the pieces fit together
Converting values between tools and CSS
Design tools express tracking in thousandths of an em. To bring a value into CSS, divide by 1000.
function trackingToEm(units) {
return units / 1000;
}
console.log(trackingToEm(75) + 'em'); // "0.075em"
console.log(trackingToEm(-20) + 'em'); // "-0.02em"A designer's note saying "tracking +120 on the labels" therefore becomes letter-spacing: 0.12em. Use em rather than px so the value follows the font size.
Interactions to watch for
Two behaviors can surprise you when you track text.
- Ligatures. Browsers do not apply optional ligatures when
letter-spacingis non-zero, since joining letters that you have deliberately separated would defeat the spacing. Tracked capitals rarely use ligatures anyway, but you can turn them off explicitly so rendering stays predictable.
.tracked-caps {
text-transform: uppercase;
letter-spacing: 0.1em;
font-variant-ligatures: none;
}- Kerning data. Kerning is still applied when you track text, and the two adjustments add together. If you compare the same text with kerning on and off, use
font-kerning.
body {
font-kerning: normal;
}
.kerning-off {
font-kerning: none;
}For all-caps text, the font's kerning for capital pairs still matters. A pair such as "AV" is pulled tight by kerning, and positive tracking then opens every pair evenly. The result is that the tight pair stays relatively tighter than its neighbors, which is usually what you want.
Common mistakes
- Using one tracking value for the whole page. Headings, body, and labels each need their own value.
- Tracking lowercase body text open for style. This slows reading.
- Forgetting
text-transform: uppercaseand typing capitals directly, then trying to maintain two different values. Apply the case in CSS and keep the tracking in the same rule. - Using px for tracking, so the spacing stays fixed when the text scales.
- Relying on tracking to fix a single bad pair. Kern that pair instead.
- Trusting numbers over your eyes. A value that is right for one typeface can be wrong for another with different default sidebearings.
Exercises
Exercise
A design file specifies an eyebrow label at 12px, all caps, with tracking +100. Write the CSS rule.
Show answer
Divide 100 by 1000 to get 0.1em. .eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
Exercise
A teammate sets paragraph text in a lowercase text font with letter-spacing: 0.08em to make it look more elegant. Give two reasons to change it, and say what value you would start from.
Show answer
Open tracking on lowercase text makes the gaps between letters compete with the gaps between words, so word boundaries are harder to see and reading slows. It also makes the text color uneven. Start from letter-spacing: 0 with font-kerning: normal, and add at most 0.01em if the font is tight at small sizes.
Exercise
A 6rem headline looks good with letter-spacing: -0.02em, but the pair "Ty" still has a visible hole. What should you do, and why does tracking not fix it?
Show answer
Kern the pair manually, for example by wrapping the two letters in a span and giving it a more negative letter-spacing, or by adjusting the pair in the design tool. Tracking applies the same amount to every pair, so tightening further to close the hole would make the other pairs too tight.