Sub topic 12
How Letter Spacing Interacts with Ligatures
This chapter assumes you know what a glyph is and can read basic CSS. It also assumes you have met kerning, tracking and the letter-spacing property in earlier chapters. Here you will see why adding tracking can change which glyphs appear on screen, not just how far apart they sit.
What a ligature is
A ligature is a single glyph that replaces a sequence of letters. The classic example is "fi". In many fonts the hook of the "f" would collide with the dot of the "i". The font therefore contains a combined "fi" glyph with the dot removed or merged into the hook.
Ligatures fall into two groups.
- Standard (optional) ligatures such as fi, fl, ff and ffi. Fonts turn them on by default through the OpenType
ligafeature, andclig(contextual ligatures) is similar. - Required ligatures. Some scripts cannot be written correctly without joined forms. Arabic is the common example.
A third group, discretionary ligatures (dlig), is off by default. Designers switch it on for decorative effect, for example a "ct" or "st" ligature in a book title.
Because a ligature is one glyph, it has one advance width and its own sidebearings. The font designer drew the letters inside it at fixed distances from each other. Those distances belong to the glyph. They are not spacing the layout engine can adjust.
Why tracking and ligatures conflict
Tracking adds the same amount of space after every character. If "fi" is two characters, tracking inserts a gap between "f" and "i". If "fi" is one glyph, there is no point inside it where a gap can go.
Layout engines have two ways to resolve this.
- Keep the ligature and skip the gap. The result is uneven: every pair of letters has the new spacing except one, which stays tight.
- Break the ligature into separate glyphs and then add the gap. The spacing stays even, but the text no longer uses the designer's ligature forms.
The CSS Text specification chooses the second option. When the effective letter-spacing between two characters is not zero, user agents should not apply optional ligatures. Current major browsers follow this. Only the value matters, not its sign. A headline with letter-spacing: -0.02em loses its ligatures, and so does a label with letter-spacing: 0.1em.
Kerning still applies in this path. Kerning is pair adjustment between separate glyphs, so it works whether or not tracking is present. The browser adds the letter-spacing value on top of the kerned advance.
Seeing it in practice
The next example sets the same word with and without tracking. It only illustrates the behavior, so use a font that has an "fi" ligature, such as most text faces.
.plain {
font-size: 3rem;
letter-spacing: 0;
}
.tight {
font-size: 3rem;
letter-spacing: -0.02em;
}With .plain, the word "office" shows the "ffi" ligature if the font provides one. With .tight, the same word is built from separate f, f and i glyphs. If the font's "f" has a long overhanging hook, you may see the hook touch the next letter. The ligature existed to prevent exactly that.
A change of 0.02em is hard to see as spacing, yet it is enough to turn the ligature off. The ligature switch is binary, not proportional.
Controlling ligatures explicitly
Because the browser makes the decision implicitly, it helps to state your intent in the stylesheet. The font-variant-ligatures property controls the ligature features directly.
| Value | Effect |
|---|---|
| `normal` | The browser applies the font's default ligatures, subject to the letter-spacing rule. |
| `none` | Turns off all ligature features. |
| `common-ligatures` | Explicitly requests `liga` and `clig`. |
| `no-common-ligatures` | Turns off `liga` and `clig` only. |
| `discretionary-ligatures` | Turns on `dlig` for decorative forms. |
Here is the tracked all-caps case from the topic plan. Writing font-variant-ligatures: none makes the result the same in every rendering engine.
.tracked-caps {
text-transform: uppercase;
letter-spacing: 0.1em;
font-variant-ligatures: none;
}This rule changes nothing in browsers that already skip ligatures here. Its value is predictability. An older engine, an exported PDF renderer or an email client may behave differently, and the explicit declaration removes that difference.
The lower-level font-feature-settings property can switch features individually. The two properties do the same job here.
.tracked-caps-low-level {
text-transform: uppercase;
letter-spacing: 0.1em;
font-feature-settings: "liga" 0, "clig" 0;
}Prefer font-variant-ligatures when you can. It cascades more predictably, because font-feature-settings overrides the other font-variant properties and can wipe out features you set elsewhere.
Case and ligatures
Ligatures matter most in lowercase text, because the standard pairs (fi, fl, ff) are lowercase letter combinations. When you apply text-transform: uppercase, the browser changes the characters before it shapes them, so "fi" becomes "FI" and the lowercase ligature is no longer a candidate. Some fonts do include capital-letter ligatures or alternates, but these are uncommon and usually discretionary.
This is why tracked all-caps labels rarely lose anything visible when ligatures are disabled. The pitfall is in the other direction: tight tracking on mixed-case display text.
When losing the ligature hurts
Consider a large headline set with negative tracking, which is a common display-type choice.
.headline {
font-size: 4rem;
letter-spacing: -0.02em;
}If the headline contains "fi", "fl" or "ffi", the ligature disappears. You then see the collision the font designer wanted to avoid, now with even less space between the letters. Possible responses:
- Check the headline by eye and look for collisions in f-pairs. Use the visual tests from the evaluation chapter.
- Reduce the negative tracking until the collision is gone. This may mean a value near 0, which defeats the point of tightening.
- Choose a typeface whose "f" has no overhang, or one designed for display sizes with ligature-free spacing.
- Rewrite the headline when the layout allows it.
- Test whether your target browsers allow
font-feature-settings: "liga" 1to restore ligatures despite non-zero tracking. Behavior varies by engine, so verify it and do not assume it. Even if it works, the ligature glyph will not receive the extra spacing, so the pair looks tighter than its neighbors.
Design tools versus CSS
Design applications handle this differently from browsers. Many tools let you apply tracking and keep ligatures active at the same time, and the ligature glyph simply does not receive spacing inside itself. Others expose a separate ligature toggle in their character panel. The preview in a design file therefore may not match the browser. When you translate a design into CSS, compare the two renderings for any word that contains an f-pair.
A useful hand-off habit is to record two things beside each tracking value: the unit conversion (for example 75 units is 0.075em) and whether ligatures are meant to be on. That second note prevents a surprise at review time.
Cursive scripts
For scripts such as Arabic, letters join to their neighbors, and spacing between them breaks the connection. The specification therefore says that letter-spacing should not be applied between letters of such scripts. Required ligatures are not affected by the optional-ligature rule. If you build a multilingual site and apply a global letter-spacing to a class, check that it does not appear in cursive-script text. A safe approach is to scope the rule to Latin-only components, or to override it by language.
:lang(ar) {
letter-spacing: 0;
}Quick reference
- Zero
letter-spacing: optional ligatures can form. - Any non-zero
letter-spacing, positive or negative: browsers skip optional ligatures. - Kerning stays active either way unless you set
font-kerning: none. - State your choice with
font-variant-ligaturesso results do not depend on the engine. - Check f-pairs by eye whenever tracking is applied to mixed-case display text.
Exercise
A headline in a serif font uses letter-spacing: -0.015em. The word "Official" now shows the f hooks touching the next letters, though it looked fine at letter-spacing: 0. Explain why this happened, and give two ways to fix it.
Show answer
Any non-zero letter-spacing makes browsers skip optional ligatures, so the "ffi" ligature was replaced by separate f, f and i glyphs. The ligature had been drawn to keep the hooks clear of the next letters, and the negative tracking moved the separate glyphs even closer. Fixes: set the headline's letter-spacing to 0, or reduce the negative value only if the collision goes away. Choose a typeface without overhanging f hooks. Test whether font-feature-settings: "liga" 1 restores the ligature in your target browsers, accepting that the ligature glyph will not receive the tracking.
Exercise
Why is font-variant-ligatures: none recommended on a tracked all-caps label, even though browsers already skip optional ligatures when letter-spacing is not zero?
Show answer
The declaration states the intent and removes dependence on engine behavior. Older renderers, PDF exporters and email clients may not apply the same rule, so explicitly disabling ligatures keeps the label's spacing consistent everywhere.