Loading Variable Fonts Without the Flash of Invisible Text
A practical font-display setup for type-heavy pages.
Variable fonts promise one file for every weight, but a careless setup still leaves readers staring at a blank page while the file downloads.
Setting type in the browser is still typesetting. The measure, the leading and the rhythm of the page matter as much on a screen as they did in a chase.
From the Case to the Stylesheet
Variable font with swapCSS · @font-face
@font-face {
font-family: "Courier Serif";
src: url("/fonts/courier-serif.woff2") format("woff2-variations");
font-weight: 300 900;
font-display: swap;
}
body { font-family: "Courier Serif", Georgia, serif; }The good news is that CSS now gives us most of the controls a compositor had, from ligatures to hanging punctuation, if we are willing to use them.
- Limit the measure with the ch unit.
- Use unitless line-height values.
- Load only the font weights the page actually uses.
Have a correction or a story of your own? Write to the desk at desk@example.com and we will add it to the next issue.

That clip is a better lesson in pacing than half the books on my shelf.
We have a drawer of this exact wood type at our shop. I never knew where it came from until now.
I appreciate that you mention the mistakes as well as the successes.