Home / Fix guides / Speed and Core Web Vitals

How to fix "Ensure text remains visible during webfont load"

This warning means your site hides text until a custom font has downloaded. The fix is to add font-display: swap (or optional) to each font so visitors see readable text straight away.

Your page loads, but for a moment the headlines and paragraphs are missing, or you see blank space where text should be. Then the text pops in. That is what this warning describes: the browser is waiting for a custom web font to download before it shows any words. It is common, it is usually a small fix, and you do not need to be a developer to understand it.

What people see

Web fonts are font files your site downloads so that text looks the way your brand wants. While the file is still on its way, the browser has to decide what to do with the text. By default, many browsers hide it for a short time (up to about three seconds in some cases) and then show it once the font arrives, or fall back to a standard font if it takes too long.

On a fast connection you may never notice. On a phone with a weak signal, a visitor can stare at a page with images and buttons but no readable words. Tools such as Lighthouse and PageSpeed Insights report this as "Ensure text remains visible during webfont load" (newer versions of Chrome DevTools may label it as a font display issue instead).

Why it matters

  • Visitors leave. If they cannot read anything, they may assume the page is broken and go back to the search results.
  • Speed scores suffer. Invisible text delays the moment people can actually use the page, which can affect loading metrics such as First Contentful Paint, and Largest Contentful Paint (a Core Web Vital) when your main heading is the largest element.
  • Trust and sales. A product name or a price that appears late makes a shop feel slow, and slow shops lose orders.

How to check if your site has it

These are all free:

  1. Go to PageSpeed Insights (pagespeed.web.dev), enter your page address and run the test. Open the diagnostics and look for the font display item. It lists the font files that are blocking text.
  2. In Chrome, open your page, press F12, go to the Lighthouse tab and run a report for mobile.
  3. To see it with your own eyes, open DevTools, go to the Network tab, set throttling to a slow option such as Slow 4G, and reload. If text is blank for a moment, you have the problem.
  4. Look at your site's CSS for @font-face rules. If none of them contain a font-display line, the browser uses its default, which often hides text.

How to fix it in general

The fix is one line of CSS inside each @font-face rule:

@font-face {
  font-family: "Your Font";
  src: url("/fonts/your-font.woff2") format("woff2");
  font-display: swap;
}

The common values are:

ValueWhat happens
swapText shows at once in a fallback font, then switches when the web font arrives. Best default.
fallbackVery short hidden period, then fallback text. The switch only happens if the font arrives quickly.
optionalBrowser may skip the web font entirely on slow connections. Least layout movement, but your font may not always show.
blockHides text for a while. This is what triggers the warning.

For most business sites, swap is the right choice. Two extra steps help:

  • Google Fonts: if your site loads fonts from a Google Fonts link, make sure the address ends with &display=swap. Check your theme, because some set this and some do not.
  • Preload your most important font: adding a <link rel="preload" href="/fonts/your-font.woff2" as="font" type="font/woff2" crossorigin> tag in the page head for the main heading font means it starts downloading earlier. Only preload one or two fonts, otherwise you slow other things down.

One side effect: when swap replaces the fallback font, text can shift slightly because the two fonts have different widths. If that bothers you, read about font layout shift.

Common platforms

Exact menus depend on your theme, version and any plugins, so treat these as where to look.

  • WordPress: many themes and page builders have a font or performance setting where you can choose the font display. If your theme loads Google Fonts, check its typography settings, or ask your developer to add font-display: swap. See the WordPress guide. Elementor has its own setting, covered in the Elementor guide.
  • Shopify: fonts are usually set in the theme code, in a font_face style or a stylesheet inside the theme files. Look for font_display or font-display and set it to swap. See the Shopify guide.
  • Webflow, Squarespace: custom fonts are managed in the site's font settings. Webflow lets you pick a font display option for custom fonts, while Squarespace gives you less control, so you may need custom CSS or to accept the default.
  • Next.js: the built in font loader (next/font) sets this for you, and you can choose the display option.
  • Google Tag Manager: if a tag injects a font stylesheet, add display=swap to that address.

If your site is custom built, send your developer the name of the font files from the PageSpeed report and ask them to add font-display: swap. It is normally a short job.

How to confirm the fix worked

  1. Clear your site cache and any caching plugin or CDN cache, because old CSS can hang around.
  2. Run PageSpeed Insights again on the same page. The font display item should be gone or show no wasted time.
  3. Repeat the Slow 4G test in Chrome DevTools. You should see readable text immediately, even if it briefly looks like a plain font.
  4. In DevTools, open the Network tab, click the CSS file with your fonts and check that font-display appears in the rules.

Test more than one page, since templates for the home page, blog and shop can load different fonts.

How to stop it coming back

  • Whenever you change theme, add a font or install a page builder, retest a key page.
  • Use fewer fonts and weights. Each extra file is one more thing to wait for.
  • Host fonts in the WOFF2 format, which is smaller than older formats.
  • Keep a note of which fonts your site should use, so a new plugin does not quietly add another set.
  • Re-test now and then. Week 4 of SiteMonday covers speed and Core Web Vitals and flags font loading problems like this one in a written report with a ranked fix list, so you can see what to hand to your developer first. Fixing it stays with you or your developer.

Step by step for your platform

Questions

What does "Ensure text remains visible during webfont load" mean?

It means the browser hides your text until a custom font finishes downloading. Setting `font-display: swap` makes the text show immediately in a fallback font.

Is `swap` or `optional` better?

`swap` is the safest choice for most sites because your chosen font always appears eventually. `optional` avoids text shifting but may skip your font on slow connections.

Will this fix change how my site looks?

Slightly, for a moment. Visitors may briefly see a standard font before your custom font replaces it, but they can read the text the whole time.

Does this affect my Google ranking?

It can indirectly, because it affects loading speed measures such as First Contentful Paint. It is one factor among many, not a ranking switch.

I use Google Fonts. What should I do?

Check that the font link ends with `&display=swap`. If your theme or plugin controls the link, look in its typography or performance settings.

Do I need a developer to fix this?

Not always. On many platforms it is a single setting, but on custom themes someone may need to edit the CSS to add `font-display: swap`.

Related problems