Font loading strategies that stop the page from jumping
That moment where text visibly reflows as a custom font swaps in for a fallback font is one of the more common and more fixable causes of layout shift we find in audits, and it's worth understanding why it happens before jumping to a fix.
Why the shift happens at all
Browsers have to download a custom web font before they can render text in it, and by default, many will render text in a fallback system font first, then swap to the custom font once it loads. If the two fonts have meaningfully different character widths, that swap visibly reflows the layout, sometimes shifting entire sections of the page.
font-display: swap is a start, not a full fix
The `font-display: swap` CSS property tells the browser to show fallback text immediately rather than an invisible waiting period, which improves perceived load speed but doesn't solve the reflow itself, since a swap to the custom font can still shift the layout once it arrives.
Size-matching the fallback font closes the real gap
The more complete fix is choosing a fallback font, or using CSS font metric overrides, size-adjust, ascent-override, descent-override, to make the fallback font's character widths closely match the custom font's. Tools exist specifically to calculate these override values automatically for a given font pairing, and this is the step that actually eliminates most of the visible shift, not just the perceived delay.
Preload the fonts actually used above the fold
Adding a preload hint for the specific font files used in above-the-fold content gets the browser fetching them earlier in the loading sequence, reducing the window during which a swap can visibly occur. We only preload what's actually needed immediately, since over-preloading competes with other critical resources for bandwidth.
Variable fonts can reduce the problem's surface area entirely
A single variable font file covering multiple weights and styles means fewer separate font downloads and fewer opportunities for a visible swap across a page using several weights of the same typeface. We default to variable fonts where the type choice supports it, partly for this reason and partly for the smaller total file size.
What we check after implementing this
We verify the fix with Chrome DevTools' performance panel, specifically watching the layout shift regions during a fresh page load, and confirm the CLS score improvement in both lab and, over the following weeks, field data. On a recent client site, this specific fix alone dropped CLS from 0.19, a failing score, to 0.03.
We verify the fix with Chrome DevTools' performance panel, specifically watching the layout shift regions during a fresh page load, and confirm the CLS score improvement in both lab and, over the following weeks, field data.
Self-hosting fonts removes a whole category of the problem
Loading fonts from a third-party service adds an extra DNS lookup and connection setup before the font file itself can even begin downloading, which extends the window during which a fallback font is showing and a swap can occur. Self-hosting font files alongside the rest of the site's static assets removes that extra round trip entirely and gives more direct control over caching headers too.
We've moved most client projects to self-hosted fonts for exactly this reason, and the improvement shows up reliably in both the layout shift metric and the broader loading performance picture, since a self-hosted font benefits from the same edge caching as the rest of the site's static assets rather than depending on a separate third-party service's own caching and delivery behavior.
Subsetting fonts to the characters actually used
A full font file often includes character sets for languages and symbols a given site never uses, adding real, unnecessary weight to a file that's already on the critical rendering path. Subsetting a font down to just the character ranges the site actually needs, Latin characters and common punctuation for most of our clients, meaningfully shrinks the file and gets it downloaded and rendered faster.
Don't treat this as a one-time fix and move on
Layout shift from font loading has a habit of reappearing quietly when a design update adds a new font weight or a new typeface without anyone re-checking the fallback matching and preload configuration that fixed the original problem. We include a font-loading check as a standing item in our post-launch performance review specifically because this regression is common and easy to miss until a CLS score quietly creeps back up months later.
System font stacks avoid the problem entirely, when the design allows it
The most complete fix for font-related layout shift is simply not loading a custom web font at all, using a well-chosen system font stack instead, which renders instantly with zero download and therefore zero swap. This isn't the right call for every brand, since a distinctive custom typeface is a real part of visual identity for a lot of clients, but for projects where brand guidelines allow flexibility, we raise it as a genuinely valid option rather than assuming a custom font is always required.
System font stacks have also improved significantly as an aesthetic option in recent years, since the fonts operating systems ship by default are generally well-designed and no longer carry the slightly dated look they had a decade ago. We've had more than one client, after seeing a side-by-side comparison, decide the performance and simplicity benefit was worth giving up a custom typeface they weren't especially attached to in the first place.
Icon fonts deserve the same scrutiny as text fonts
Icon fonts are a less obvious source of the same problem, since an icon rendered via a web font swap can visibly pop into place the same way body text does, and we increasingly recommend inline SVG icons instead specifically to avoid this entire category of shift. SVG icons render immediately with the rest of the markup and carry none of the font-loading timing dependency that makes icon fonts a recurring, if less commonly discussed, source of layout instability. Migrating an existing icon font to inline SVG is usually a bounded, low-risk piece of work we can slot into an otherwise unrelated sprint, and it's one of the easier wins we point to when a client asks what else is left on the performance checklist after the bigger fixes are done.