Sub topic 6
Finding the shared structure
Contrast makes two typefaces distinct. Shared structure makes them look like they belong on the same page. This chapter covers how to find that structure and check it. It assumes you know the anatomy terms from earlier chapters: x-height, stroke modulation, axis, and proportions.
What "shared structure" means
Shared structure is a set of measurable traits that two typefaces have in common, even when their classifications differ. A serif and a sans serif can both have a similar x-height, a similar width, and a similar stroke rhythm. The reader then sees different voices that were drawn with the same underlying logic.
The traits worth comparing are these:
- X-height ratio. The height of lowercase letters relative to the font size.
- Proportions. Whether the letters are wide, narrow, or in between, and how round the bowls of letters like o and e are.
- Stroke modulation. How much thick and thin strokes differ within a letter.
- Axis. The angle of stress in rounded letters. Vertical or slanted.
- Overall color. The visual darkness of a block of text at the same size.
You do not need to match all five. Matching two or three, while contrasting on one or two clear dimensions, is usually enough.
A worked comparison
Take Playfair Display and Source Sans 3, the pair used in this tutorial's code examples.
| Trait | Playfair Display | Source Sans 3 | Relationship |
|---|---|---|---|
| Classification | Transitional/Didone serif | Humanist sans serif | Contrast |
| Stroke modulation | High | Low | Contrast |
| Axis | Vertical | Slight, humanist feel | Partly shared |
| Proportions | Fairly round, open | Fairly round, open | Shared |
| X-height | Large | Moderate | Needs adjusting |
The pair contrasts clearly on classification and modulation. It shares rounded, open proportions. The x-height is where they drift apart, and that is something you can correct in CSS.
How to check it
Use a quick visual test before you open any code.
- Set the same word in both faces at the same font size, for example "Hamburgefonstiv". Use lowercase letters, since x-height shows most clearly there.
- Place the two words on the same baseline, one above the other.
- Look at where the tops of the lowercase letters land. A gap between them shows an x-height mismatch.
- Squint or blur the page. If one line looks much darker or lighter, the overall color differs.
- Compare the round letters o and e. Round in one face and oval in the other signals different proportions.
Correcting x-height in CSS
When two fonts have different x-heights, the same font-size makes one look larger. The font-size-adjust property scales each font so its x-height matches a ratio you choose. It also applies to fallback fonts, which keeps the layout stable if a web font fails to load.
body {
font-family: "Source Sans 3", system-ui, sans-serif;
font-size-adjust: 0.5;
}
h1, h2, h3 {
font-family: "Playfair Display", Georgia, serif;
font-size-adjust: 0.5;
}A value of 0.5 asks the browser to scale each font so its x-height is about half of the font size. Choose a value close to the x-height ratio of your body face. Setting it on both rules gives the two typefaces, and their fallbacks, the same apparent size.
Common mistakes
- Matching only classification. Two serifs can still differ widely in proportions and color.
- Ignoring x-height. Pairs that look right in a specimen can look unbalanced once set at the same size.
- Matching everything. If every trait is shared, the pair is too similar and drifts toward conflict, which a later chapter covers.
Exercise
You set a serif heading and a sans serif body at the same font size. The serif lowercase letters look noticeably smaller. Which structural trait is the likely cause, and which CSS property helps fix it?
Show answer
The x-height differs, so the serif has a lower x-height ratio and its lowercase letters look smaller. Applying font-size-adjust with the same value to both font families scales each font to a matching x-height. You can also raise the font-size of the serif by hand.
Exercise
Name two traits you would try to share and two you would contrast when pairing a high-modulation serif with a sans serif.
Show answer
Share x-height and proportions (for example, round and open letterforms). Contrast classification (serif against sans serif) and stroke modulation (high against low).