The short fix
- Note the font files listed in your test report.
- For Google Fonts, add
&display=swapto the stylesheet URL, or host the fonts yourself withfont-display: swap. - For theme, plugin and icon fonts, add
font-display: swapto their@font-facerules with a plugin option or your own CSS. - Remove font families and weights the page doesn’t use, and preload the one font the first screen needs.
- Re-test, and check that the page doesn’t jump when the web font swaps in.
What PageSpeed Insights is telling you
Font display is a Lighthouse 13 insight, listed under Insights in PageSpeed Insights. It replaced the older audit Ensure text remains visible during webfont load one to one.
It lists web fonts whose @font-face rule doesn’t let text show while the font loads: font-display: auto (which is also what you get when the rule is missing), block or fallback. Setting swap or optional passes. Each listed font comes with the time it could keep text hidden.
In a FlashMax report this problem is the card Text waits for fonts. It appears when a web font hides text for 100 ms or more while it loads.
Why it slows the page
Invisible text delays First Contentful Paint (10% of the Lighthouse score). If the largest element of the first screen is a heading or a block of text, it delays LCP too (25%); in our study that was the case on 17.1% of stores. And when a font swaps in late, lines can change width and push the page around, which counts towards CLS (25%).
font-display decides what happens while the font downloads. Text is invisible during a block period; during a swap period a fallback font shows and the web font replaces it when it arrives; after that the fallback stays. The values:
auto: the browser decides; Chrome and Firefox hide text for up to 3 seconds;block: text hidden for 2–3 seconds, then the font swaps in whenever it arrives;swap: no hiding; the font swaps in whenever it arrives;fallback: hidden for about 100 ms, swaps only within about 3 seconds;optional: hidden for about 100 ms, no swap; if the font isn’t ready by then, the fallback stays for that page view.
swap always ends with your brand font but can cause a small shift; optional never shifts but may show the fallback on a slow first visit.
How common it is
In our study of 40,951 WooCommerce stores, 48.4% (19,809 stores) got this card. Their median phone score was 50, against 55 for stores without it. That gap is a correlation, not proof: stores with font problems usually have other problems too.
Fonts are not tiny either: the median store downloaded 224,966 bytes (about 225 KB) of fonts in the phone test.
How to find the fonts that hide text
- FlashMax: the free speed test (about a minute) lists the font files behind the card.
- PageSpeed Insights: open Font display under Insights to see each font URL.
- Chrome DevTools: in the Network panel, filter by Font. The Initiator column shows which CSS file requested each font; open that file and search for
@font-faceto see whetherfont-displayis set.
On a WooCommerce store the usual sources are the theme’s Google Fonts, page-builder fonts, icon fonts (Font Awesome and builder icon sets) and WooCommerce’s own icon font, WooCommerce.woff2, used for rating stars. Its @font-face rules set no font-display.
How to fix it on WordPress and WooCommerce
Google Fonts
If the theme loads fonts from fonts.googleapis.com, the URL accepts a display parameter: https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap. If your theme offers a font-loading setting, choose swap.
You can also host the fonts on your own domain. That removes the connections to two extra servers, and since version 86 Chrome no longer shares cached files between sites, so visitors don’t arrive with Google Fonts already cached. Plugins that do it:
- WP Rocket: Optimize Google Fonts (on by default on new installs; older sites switch it on from the Tools tab) combines the requests and adds
display=swap. Self-host Google Fonts locally (Media tab) downloads the fonts and serves them from your domain. It only catches fonts linked in the page HTML, not those pulled in from CSS files. - Perfmatters: under Fonts, Local Google Fonts downloads the fonts and serves them locally, and Display Swap adds swap. Display Swap applies to Google Fonts only.
- Elementor: in Elementor’s settings, Advanced tab, set Google Fonts Load to Swap (or Optional). In the Performance tab, set Load Google Fonts Locally to Enable; it is off by default since Elementor 3.32.1.
- WordPress Font Library (6.5+): Google Fonts installed through it are downloaded to your server and served from there.
Theme, plugin and icon fonts
Fonts declared inside theme or plugin CSS files need font-display in their own @font-face rules. LiteSpeed Cache has Font Display Optimization (Page Optimization → CSS Settings), which appends font-display to every @font-face rule before the CSS is cached, so it covers these too. Otherwise, ask the theme or plugin author to add it.
Icon fonts are a special case: with swap, letters can flash where icons should be. WooCommerce’s rating stars, for example, are the letters “sssss” drawn in its 6 KB icon font. Where you can, use SVG icons instead: Elementor’s Inline Font Icons renders icons as inline SVG rather than font files.
Load fewer fonts
Every family, weight and style is a separate file. If headings are bold and body text is regular, you need two files, not nine. Remove weights you don’t use in the theme’s typography settings, switch off fonts loaded by plugins you don’t need, and serve WOFF2 only.
Preload the one font the first screen needs
Preloading starts the font download before the CSS that needs it is parsed. Do it for one font, two at most, because preloads take bandwidth from everything else. Perfmatters has manual preloads with a font type; without a plugin, use the wp_preload_resources filter. Fonts need crossorigin even on your own domain:
add_filter( 'wp_preload_resources', function ( $resources ) {
$resources[] = array(
'href' => get_stylesheet_directory_uri() . '/fonts/inter-latin-400.woff2',
'as' => 'font',
'type' => 'font/woff2',
'crossorigin' => 'anonymous',
);
return $resources;
} );
Shopify and hand-built sites
Shopify: themes output their fonts with the font_face filter, which takes a font_display parameter. Look for it in your theme’s Liquid files and make sure it reads:
{{ settings.type_body_font | font_face: font_display: 'swap' }}Fonts added by apps are up to the app; if one is flagged, ask the developer.
Hand-built sites using Google Fonts: connect early and keep display=swap in the URL:
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap">Self-hosted fonts: WOFF2 with font-display: swap, plus a fallback adjusted to the web font’s proportions so the swap barely moves anything:
@font-face {
font-family: "Inter";
src: url("/fonts/inter-latin-400.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
/* Fallback shaped like the web font. Example values: calculate them for your font. */
@font-face {
font-family: "Inter fallback";
src: local("Arial");
size-adjust: 107%;
ascent-override: 90%;
descent-override: 22%;
line-gap-override: 0%;
}
body { font-family: "Inter", "Inter fallback", sans-serif; }The override values depend on your font and fallback. Tools such as Fontaine and the Google Fonts dataset of precomputed overrides give you real numbers; Next.js (next/font) adds them automatically. To preload the main font:
<link rel="preload" href="/fonts/inter-latin-400.woff2" as="font" type="font/woff2" crossorigin>
Mistakes to avoid
- Preloading every font. Preloads compete with your main image and CSS. One, two at most.
- A font preload without
crossorigin. It doesn’t match the real font request, and the font is downloaded twice. - Swap with an unmatched fallback. The warning goes, but the page jumps when the font arrives. Check layout shift after the change.
- Optional without a preload. On a slow first visit the web font rarely makes it in time, so visitors mostly see the fallback.
- Inlining font files as base64 in CSS. It makes the CSS heavier and blocks the first paint longer.
- Scripts that hide the page until fonts load. Some themes add a class that keeps text invisible until a font loader finishes; that recreates the problem in another way.
How to check the fix worked
Clear the page cache (and the CSS cache of your optimization plugin), then re-test the same page two or three times, because lab results vary. Font display should list no fonts. In DevTools, self-hosted fonts should now come from your own domain, and text should be visible in the first frames of the Performance panel’s screenshots.
Check the layout shift result too: if it got worse, adjust the fallback. Field data in Search Console and the Chrome UX Report covers the last 28 days, so allow about four weeks for it to reflect the change.
Questions people ask
Should I use font-display: swap or optional?
Use swap when the brand font matters, for example in headings, and pair it with a matched fallback. Use optional for body text when you want no shifts at all, and preload that font so it usually makes the first paint.
Does self-hosting Google Fonts make my site faster?
It can, but it isn’t automatic. It removes connections to two extra servers, and the shared cross-site cache that once favoured Google’s servers is gone. It works best when your own server or CDN serves WOFF2 files over HTTP/2, with only the weights and character sets you use, so measure before and after.
Why does PageSpeed Insights still flag fonts after I added display=swap?
The display parameter only fixes Google Fonts. Icon fonts and fonts declared in theme or plugin CSS files need font-display in their own @font-face rules. Also clear the page cache and any CSS cache, or the old files keep being served.
How many fonts should I preload?
One, two at most: the font used by the text in the first screen. Preloading more takes bandwidth from the main image and CSS and can make the page slower.
Sources
- Font display (Chrome for Developers)
- Best practices for fonts (web.dev)
- Improved font fallbacks (Chrome for Developers)
- rel=preload (MDN)
- CSS API update (Google Fonts for developers)
- Self-host Google Fonts (WP Rocket docs)
- Host Google Fonts locally (Perfmatters docs)
- Choose a loading method for Google fonts (Elementor Help Center)
Rather have it done?
The FlashMax team fixes the issues in your report, on a copy first, and shows the before-and-after.
See the speed optimization service