Menu

Headline font vs body font: x-height and letter spacing
📰

Headline font vs body font: x-height and letter spacing

DEV Community: css·Hassan Aziz·3 days ago
#jqkrrLho
#devtocss#devto#dev#height#font
Long article (1949 words) — no AI summary yet.
Reading 0:00
15s threshold

The short version

Pick body fonts with a tall x-height and loose built-in letter spacing, because body text is small. Headline fonts can have a shorter x-height and tighter spacing.

The x-height is the height of a lowercase x. At 48px it measures 22.5px in Jost and 25.5px in Montserrat, even though both fonts have the same cap height.

Every font has letter spacing built in. At 48px, "Some text" is 196px wide in Jost and 244px in Montserrat, from wider letters and about 41% more space around each one.

You can measure any loaded font in the browser console: canvas measureText() gives the x-height from a lowercase x and the built-in spacing from each letter's advance width minus its ink.

Keep display fonts on large headlines. With a serif display font like Playfair Display the thin strokes give it away: about a third of a pixel thick at 16px.

A body font should have a tall x-height and loose built-in letter spacing, because body text is small and both of those make small letters easier to read.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.