Sub topic 5
Tracking: Adjusting Space Across a Whole Run of Text
Tracking changes the space between all letters in a run of text by the same amount. This chapter covers what tracking does, how design tools and CSS express it, when to use it, and where it goes wrong. It assumes you know the basic vocabulary (typeface, font, glyph, baseline, point size) and have used either a design tool such as Figma, Illustrator, or InDesign, or basic CSS.
What tracking is
Every glyph has an advance width: the horizontal distance the text cursor moves after drawing it. The advance width includes the glyph's left and right sidebearings, which are small gaps on either side of the letter shape. Kerning then adjusts specific pairs, such as "AV" or "To", by a pair-specific amount.
Tracking works on a different level. It adds the same amount of space (or removes it) after every glyph in a selection. A tracking value of +50 opens up every pair equally, and a value of -20 tightens every pair equally. The font's design is not changed. Only the layout of the text run is.
Tracking is also called letter spacing. Design tools such as InDesign and Illustrator use "tracking" for the control. CSS uses letter-spacing. They describe the same operation.
How tracking is applied
Tracking is applied on top of the font's built-in spacing. The layout engine does the following for each pair of glyphs:
- Take the advance width of the first glyph (its sidebearings are already included).
- Add the kerning adjustment for the pair, if the font has one and kerning is enabled.
- Add the tracking value.
The result is the distance to the next glyph. Because tracking is added after kerning, the two effects stack. A pair kerned by -80 and tracked by +50 ends up -30 from its default spacing.
This explains an important property. Tracking never fixes a problem with one pair. If "AV" is too tight relative to "AB", adding tracking moves both pairs by the same amount, so the imbalance remains. Tracking changes the overall density of the text. Kerning corrects individual pairs.
Units: thousandths of an em
An em is a unit equal to the current font size. In a 16 px font, 1 em is 16 px. In a 40 px font, 1 em is 40 px.
Design tools express tracking in thousandths of an em. A tracking value of 100 in InDesign means 100/1000 em, which is 0.1 em. Because the unit is relative to font size, the same tracking value gives proportionally the same look at any size. A value of 50 at 12 pt adds 0.6 pt per glyph. At 48 pt it adds 2.4 pt per glyph.
To convert to CSS, divide by 1000 and use em:
function trackingToEm(units) {
return units / 1000;
}
console.log(trackingToEm(75) + 'em'); // "0.075em"
console.log(trackingToEm(-20) + 'em'); // "-0.02em"Some tools use other conventions. Figma, for example, shows letter spacing as a percentage of font size by default, where 5% equals 0.05 em, or 50 in thousandths. Check the unit label in your tool before copying a number across.
| Design tool value | Meaning | CSS equivalent |
|---|---|---|
| 0 | No change | `letter-spacing: 0` |
| 25 | 25/1000 em | `letter-spacing: 0.025em` |
| 100 | 100/1000 em | `letter-spacing: 0.1em` |
| -20 | -20/1000 em | `letter-spacing: -0.02em` |
| 5% in Figma | 0.05 em | `letter-spacing: 0.05em` |
Tracking in CSS
The letter-spacing property accepts a length. It adds that length between every pair of adjacent characters. Positive values loosen the text, and negative values tighten it. The keyword normal means no extra spacing.
Prefer em for tracking. An em-based value scales with the font size of the element, so a rule written once stays proportionate if the size changes. A value in px stays fixed and looks wrong when the text is resized.
.headline {
font-size: 4rem;
letter-spacing: -0.02em;
}
.eyebrow {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.12em;
}One subtlety: letter-spacing set on a parent is inherited as a computed length, not as an em value. If a parent at 20 px has letter-spacing: 0.1em, its children inherit 2 px, even if they use a larger font size. To keep tracking proportional, set it on the element that has the font size you care about, or reset it on children that change size.
Browsers also add the spacing after the last character in a line. That trailing space can make centered text look slightly off-center, because the visible text is shifted left by half the tracking amount. For short centered labels with wide tracking, you can correct this with a small negative margin-right equal to the tracking value, or with padding on the opposite side.
When to track text
Tracking is a tool for adjusting overall texture. The usual guidance depends on size and case.
- Large display text. Big type tends to look loose because the default sidebearings were designed for text sizes and scale up with the glyphs. A small negative tracking, often between -10 and -30 (-0.01em to -0.03em), tightens it. Check pairs afterward, since tighter spacing exposes weak kerning.
- Body text. Leave tracking at zero in most cases. The type designer set the default spacing for reading sizes. Small adjustments, such as +5 to +15 for very small text on low-resolution screens, can help legibility. Large changes harm reading.
- All-caps and small caps. Capital letters were designed to sit beside lowercase letters, so uppercase runs look cramped. Adding +50 to +150 (0.05em to 0.15em) usually helps.
- Lowercase text. Do not track out lowercase body text to make it look "airy". Letter shapes in lowercase text group into word shapes, and wide tracking breaks that grouping. Type designers have long held that anyone who would letterspace lowercase would steal sheep.
A related use of tracking is copyfitting: a slight change of -5 or -10 can pull a stray last word back onto the previous line. Keep these changes small, and apply them consistently across a paragraph or a block so one line does not look different from its neighbors.
Tracking and ligatures
Some fonts include ligatures, which are single glyphs that replace letter sequences such as "fi" or "fl". When letter-spacing is non-zero, browsers do not apply optional ligatures, because joining letters into one glyph conflicts with spacing them apart. This is deliberate and matches the CSS specification. For tracked all-caps text, you can state the choice explicitly so behavior is predictable across rendering engines:
.tracked-caps {
text-transform: uppercase;
letter-spacing: 0.1em;
font-variant-ligatures: none;
}Kerning keeps working under tracking. The font-kerning property is independent of letter-spacing, and the font's pair adjustments are still applied before the tracking value is added.
Evaluating tracked text
Judge tracking by the evenness of the texture, not by single letters. Useful checks:
- Squint or blur the text and look for dark clumps or light gaps. Even color means good tracking.
- View the text at the size it will actually be used. Tracking that looks right on a large monitor can fail at phone size.
- Compare against the default (zero tracking) by toggling the value. Be sure the change is an improvement, not just a difference.
- After tightening, scan for touching letters such as "rn" reading as "m", or "cl" reading as "d".
Common pitfalls
- Using tracking to fix a pair. If one pair looks wrong, kern that pair. Tracking affects everything.
- Mixing units. Entering 75 in a tool that expects percent, or pasting a thousandths value into CSS without dividing, gives results that are 10 to 1000 times off.
- Pixel values.
letter-spacing: 2pxis right at one size and wrong at others. - Tracking out body text. It slows reading and breaks word shapes.
- Ignoring the trailing space. Centered, widely tracked labels look shifted unless corrected.
- Over-tightening display text. Negative tracking that makes letters touch reduces legibility. Stop before shapes collide.
- Inconsistent tracking within a block. Differences between lines show as uneven texture.
Summary of the model
Tracking is a uniform offset added to every letter pair after the font's kerning. Use negative values sparingly for large display text, leave body text near zero, and open up all-caps runs. Convert design-tool values from thousandths of an em by dividing by 1000, and write the result in em.
Exercise
A designer sets an all-caps label in Figma with letter spacing of 12%, then asks for the CSS. Separately, a headline in InDesign has tracking of -25. Give the CSS letter-spacing values for both, and say why em is preferred over px.
Show answer
The label is letter-spacing: 0.12em because 12% of the font size is 0.12 em. The headline is -25/1000 em, so letter-spacing: -0.025em. The em unit is relative to the font size, so the spacing stays proportional when the text is resized, while a px value stays fixed and looks too loose or too tight at other sizes.
Exercise
A pair of letters, "AV", is kerned by -80 units in the font. You apply tracking of +50 to a line. What is the net spacing change for "AV" compared with the default, and what is the net change for a pair with no kerning, such as "HH"? Why can tracking not fix one badly spaced pair?
Show answer
"AV" changes by -80 + 50 = -30 units (-0.03 em) from its unkerned, untracked spacing. "HH" changes by +50 units (0.05 em). Tracking adds the same amount to every pair, so the difference between a badly spaced pair and its neighbors stays the same. Only kerning adjusts one specific pair.