Technical SEOSite Speed & Core Web Vitals

Font Loading Strategies That Prevent FOIT, FOUT, and Layout Shift

Custom web fonts are a common, often overlooked source of Core Web Vitals problems. They can delay text rendering entirely (Flash of Invisible Text, or FOIT), cause a visible jump when a fallback font swaps to the final one (Flash of Unstyled Text, or FOUT), and directly trigger Cumulative Layout Shift when the swapped font has different metrics than the fallback. Getting font loading right protects both LCP and CLS at once.

Set the Right font-display Value

The CSS font-display property controls this trade-off directly. font-display: swap shows fallback text immediately and swaps to the web font once loaded — good for avoiding invisible text, but it can cause layout shift if metrics differ. font-display: optional is often the better choice for performance-critical text: it gives the browser a very short window to use the custom font if it's already cached, and otherwise sticks with the fallback for that page view entirely, avoiding any shift. For brand-critical headings, swap paired with font metric overrides (below) is usually the right balance.

Preload Critical Font Files

Add a <link rel="preload" as="font" type="font/woff2" crossorigin> tag in the document head for the one or two font files used above the fold. This tells the browser to fetch the font in parallel with the initial HTML parse rather than waiting to discover it inside a CSS file, which can shave several hundred milliseconds off text render time on the LCP path if your LCP element is text.

Match Fallback Font Metrics to Eliminate Shift

Modern CSS supports size-adjust, ascent-override, descent-override, and line-gap-override inside an @font-face declaration for a fallback font, letting you make a system font like Arial mimic the exact width and height metrics of your custom web font. Tools like Fontaine (a Nuxt/Vite plugin) or the manual Font Style Matcher (by Monica Dinculescu) generate these override values automatically, effectively eliminating the layout shift caused by font swapping even when using font-display: swap.

Subset and Self-Host Your Fonts

Only include the character sets and font weights you actually use. A full Latin+Cyrillic+Greek font family file can exceed 200KB, while a subsetted Latin-only WOFF2 file with just the weights in use often comes in under 30KB. Self-hosting fonts (rather than loading from Google Fonts' CDN) removes an extra DNS lookup and connection, and lets you set aggressive cache headers and combine the preload hint with your own domain — typically 100-300ms faster than a third-party font CDN.

Limit the Number of Font Weights and Families

Every additional weight (400, 500, 600, 700) and style (italic) is a separate file the browser must fetch. Audit your site for weights that are barely used — often a design system accumulates six or seven weights over time when three would serve. Consolidating to 2-3 weights per family is a simple, high-impact reduction in both page weight and the number of render-blocking font requests on first load.

Test with Real Devices, Not Just DevTools Throttling

Font-related layout shift is often more visible on mid-range Android devices, where CPU-bound font parsing takes noticeably longer than on a developer's laptop. Use Chrome DevTools' Performance panel with CPU throttling set to 4x-6x slowdown to approximate this, and periodically test on an actual budget device if your audience skews toward lower-end hardware, since this is exactly the segment most likely to drag down your 75th-percentile CLS score in the Search Console report. For a deeper look at this, see our guide, Reducing Bounce Rates with Better Intros.

Document a Font Loading Standard for Your Team

Once you've settled on a font stack, formalize the rules — which formats to ship, which font-display value to default to, which pages get preload hints — in a short internal style guide. Design and development teams that don't document this tend to regress within a few months as new pages are added by different contributors, quietly reintroducing FOUT or CLS penalties that a one-time audit already fixed. For a deeper look at this, see our guide, How to Keep New Email Subscribers Engaged After They Opt In.