TechnicalFOITFOUTfont-display

Web font loading

The strategy for downloading and applying custom fonts; poor handling causes invisible text (FOIT), layout shift (FOUT) and slow LCP for text-led pages.

In full

`font-display: swap` shows fallback text immediately and swaps when the font arrives, protecting FCP at the cost of a shift; `optional` avoids the shift by skipping late fonts. Self-hosting with `preload` and `crossorigin`, subsetting to the characters actually used, and matching fallback metrics with `size-adjust` and `ascent-override` reduce both the delay and the shift. Third-party font hosts add an extra connection and are no longer shared-cached across sites.

Example

Self-hosting a subsetted WOFF2 file and declaring `font-display: swap` with metric-matched fallbacks removes a 0.12 CLS contribution.

Related terms

Cumulative Layout Shift

A Core Web Vital scoring unexpected visual movement of page content, computed from the largest burst of layout shifts; good is 0.1 or less…

First Contentful Paint

The time from navigation start until the browser renders the first piece of DOM content; a diagnostic metric rather than a Core Web Vital.

Preload

A resource hint that tells the browser to fetch a critical resource for the current page at high priority, before the parser would…

Largest Contentful Paint

A Core Web Vital measuring the render time of the largest image, video poster or text block visible in the viewport; good is 2.5 s or less…

Render-blocking resources

Stylesheets and synchronous scripts in the head that must be downloaded and processed before the browser can paint anything.