Dashboard

Sign out?

You'll need to sign in with Google again to open your dashboard.

Check explainer · v1

Web font performance: why text hides, shifts and reloads

Automated

Last reviewed

A web font arrives after the HTML. What happens in that gap — text hidden, the page reflowing, or the file fetched again tomorrow — is what these three grades read.

How this check works

Three grades run on the rendered page. A loaded web font used by first-screen text warns when its @font-face declares font-display: auto or block; swap, fallback and optional keep text visible and pass. Fallback metrics are compared with the web font: a width shift of 5% or more, an x-height shift of 8% or more, or a line-box change of 3 px or more warns, unless the text reports that its metrics were already adjusted. For cache, only 2xx font responses are judged: a file whose effective Cache-Control freshness is under one day — no-store, no-cache, must-revalidate with no positive max-age, or no header — warns. Every grade is a warning and never fails; without measurements the result is na (insufficient_signal), not a pass.

What does a failure look like?

A first-screen headline set in a face with font-display: block disappears until the file arrives; a fallback 9% wider than the web face reflows a heading when it swaps in; font files served with Cache-Control: no-store come back from the network on every navigation.

How to fix it, step by step

  1. Set font-display: swap on every face used above the fold, and reserve optional for faces that are safe to skip on a slow first visit.
  2. Match the fallback to the web face — size, line height and vertical metrics — so text moves less than 5% in width, 8% in x-height and 3 px in line box when the font swaps in.
  3. Serve font files from a hashed filename with a Cache-Control max-age of at least 86400 seconds (one day), and drop no-store, no-cache or must-revalidate without a positive max-age.

What does a pass or fail look like?

Good

Every first-screen face uses font-display: swap, fallback deltas stay under 5% width, 8% x-height and 3 px line box, and all font files cache for a year.

Fail

A hero headline waits on a font-display: block face while the fallback reflows the heading by 9% width — invisible text and a layout shift from one file.

Frequently asked questions

Why do fallback metrics differ on Linux?

The local render lane runs a headless browser on Linux, so the fallback family it measures is the Linux default rather than the font a visitor sees on macOS or Windows. Read the delta as a direction: a large mismatch usually survives the platform change, while a small one may not reproduce on every device.

Does font-display: optional count as a failure?

No. optional is treated like swap and fallback: text stays visible, and the browser may skip the web font for that visit. Only auto and block warn, because they can hide first-screen text while the file downloads.

Why does this report na instead of pass?

na means there was no measurement to judge. Without the local render lane — or with no 2xx font response for the cache grade — the result is na (insufficient_signal). A page with no usable face or text sample also reports na; it is insufficient_signal when the font load never completed, and not applicable when it did. A missing result is not evidence that the page is fine.

This rule is one of the checks the page scan runs. Run the free page scan

Free preview; no account needed.

Visdenda check explainers · one page per published ruleWeb font performance · v1