Skip to content
FunnelGuard

Fix guide by FunnelsGuard

FOUT layout shift: how to stop web fonts restyling your page

PRF-092Low impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

FOUT stands for flash of unstyled text. The browser paints your text straight away in a fallback font such as Arial or Times. When your web font finishes downloading, the browser swaps it in. Every letter changes shape and width.

If the two fonts have different widths and line heights, lines wrap differently and blocks move up or down. That movement is layout shift, and it counts toward Cumulative Layout Shift (CLS), one of Google's Core Web Vitals.

FOUT is the opposite of FOIT (text hidden while the font loads). With font-display: swap you trade invisible text for a visible swap. That is usually the better trade, but the swap still needs to be tidy.

Why it costs you leads or sales

The impact is usually low, but it is real in a few places. A headline that jumps as someone starts reading looks unpolished. On a form or checkout, a button or field that moves just as a visitor taps it can cause a mis-tap or a lost place. On slow mobile connections the swap happens late, after the visitor has already started to read or scroll.

Layout shift also feeds your CLS score, which can weigh on search performance and on how stable the page feels. Treat it as a polish and stability fix, not an emergency.

How a font swap moves your page
  1. Page loadsHTML and CSS arrive
  2. Fallback text paintsArial or Times shows first
  3. Web font swaps inWider letters, new line breaks
  4. Button movesVisitor taps the wrong spot

The break happens at the swap: text reflows and the call to action moves.

Layout shift before and after matching the fallback fontExample numbers
Layout shift before and after matching the fallback font (example)Default fallback: 0.1 CLS score; Preloaded font: 0.1 CLS score; Preload + metric-matched fallback: 0 CLS score0010.10.10Default fallbackPreloaded fontPreload + metric-matc…CLS score

Example: illustrative CLS values for one page. Yours will differ. Lower is better, and 0.1 or less is considered good.

How to check if your site has it

Check for FOUT and font-related layout shift
  1. Throttle the network

    Open Chrome DevTools, go to the Network tab and set throttling to Slow 4G or Fast 3G. Reload the page with the cache disabled and watch the text. If it changes shape after a moment, you have FOUT.

  2. Record a Performance trace

    In the Performance tab, tick Screenshots and record a page load. In the Experience row, look for red Layout Shift entries. Click one to see which element moved.

  3. Run Lighthouse or PageSpeed Insights

    Check the CLS figure and the 'Avoid large layout shifts' list. It names the elements that moved. If these are text blocks near a font load, fonts are the likely cause.

  4. Compare fonts

    In DevTools, inspect a heading and open the Computed tab, then Rendered Fonts. Note the fallback in your font-family list and compare its width to the web font.

How to fix it

There are three levers. Load the font sooner, make the fallback look like the web font, and pick a font-display value that suits the text. Do them in that order.

Reduce the font swap shift
  1. Self-host and preload the key font

    Preload only the one or two files used above the fold (usually the regular body weight and the heading weight), in WOFF2 format. Preloading too many files slows other resources.

  2. Define a metric-matched fallback

    Create an @font-face for a local font such as Arial and set size-adjust, ascent-override, descent-override and line-gap-override so it takes the same space as your web font. Put it second in your font-family list.

  3. Choose font-display

    Use swap if you want the web font always shown. Use optional if you prefer no visible swap: the browser uses the web font only if it is ready almost immediately, otherwise it keeps the fallback for that page view.

  4. Subset and trim the files

    Smaller font files arrive sooner, so the swap happens earlier or not at all. Drop weights and character sets you do not use.

  5. Reserve space for key elements

    Give headlines, buttons and form areas a min-height or fixed line-height so a small width change does not push content below.

Metric-matched fallback and font-displaycss
@font-face {
  font-family: 'Brand';
  src: url('/fonts/brand-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* Fallback tuned to match Brand. Values are examples: calculate yours from the font's metrics. */
@font-face {
  font-family: 'Brand Fallback';
  src: local('Arial');
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

body {
  font-family: 'Brand', 'Brand Fallback', Arial, sans-serif;
}
Preload the key font in the headhtml
<link rel="preload" href="/fonts/brand-regular.woff2" as="font" type="font/woff2" crossorigin>
Where to apply the fix on your platform
  1. Host fonts locally

    Use your theme's font setting if it offers local hosting, or upload WOFF2 files and declare them in your child theme CSS or Additional CSS (Appearance > Customize).

  2. Add the preload

    Add the preload link in your child theme's header.php or through a plugin that lets you insert head code. Check your performance plugin's font options first, as many include font preloading.

  3. Add the fallback CSS

    Paste the fallback @font-face and update the font-family rule. Block themes can set this in theme.json under typography fontFamilies.

Font loading before and after

Before

  • Fallback font has different width and line height
  • Font file discovered late, after CSS is parsed
  • Headline wraps to a new line on swap
  • Button moves down as the font loads

After

  • Fallback tuned with size-adjust and overrides
  • Key font preloaded in WOFF2
  • Line breaks stay the same at swap
  • Button stays where the visitor expects it

How to confirm it's fixed

Confirmation checks
  • Reload with Slow 4G throttling and cache disabled: text no longer changes line breaks when the font arrives
  • The Performance trace shows no layout shift entries tied to text blocks
  • The Network tab shows the preloaded font requested early, once only
  • PageSpeed Insights CLS is 0.1 or lower on mobile
  • Check a second browser (Safari or Firefox), as fallback metric overrides are handled slightly differently across browsers

How to prevent it happening again

Font problems return when someone changes the theme, adds a weight or swaps the brand font. Keep a short rule: any new font or weight needs a preload decision and a checked fallback before it goes live.

Habits that keep fonts stable
  • Limit the site to one or two families and the weights you actually use
  • Always ship WOFF2, self-hosted where you can
  • Recalculate fallback metrics whenever the brand font changes
  • Run PageSpeed Insights on mobile after theme or font changes
  • Test your top landing pages on a throttled connection, not only on fast office Wi-Fi

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It checks CLS (Cumulative Layout Shift) when its robot visitor loads your pages, so a large layout shift on a monitored journey can show up. It does not tell you that the shift came from a font swap, and it does not detect FOUT itself, such as a visible change in typeface or a fallback font in use.

To cover the rest by hand, use the checks above: throttle the network in DevTools, inspect Rendered Fonts, and read the layout shift entries in a Performance trace. A free read-only website audit is also available, and the Free plan (1 site, 2 journeys, daily checks, no card) lets you watch your key pages while you fix fonts.

Questions people ask

Why does my text change font when the page loads?

Your browser shows a fallback font while the web font downloads, then swaps it in when ready. This is called FOUT (flash of unstyled text). It is normal with font-display: swap, but you can make it far less noticeable by preloading the font and matching the fallback's size.

Does FOUT hurt SEO?

It can, indirectly. If the swap moves text, it adds to Cumulative Layout Shift, a Core Web Vitals metric. A small shift is unlikely to matter much, but a large one can leave your CLS above the 0.1 'good' threshold.

What is the difference between FOUT and FOIT?

FOUT shows text in a fallback font first, then swaps. FOIT (flash of invisible text) hides the text until the web font loads. FOUT keeps content readable, so it is usually the safer choice, but both can be improved.

How do I stop layout shift from web fonts?

Preload your main WOFF2 font with crossorigin, and add a fallback @font-face with size-adjust, ascent-override and descent-override so it matches your web font's size. You can also use font-display: optional to avoid a visible swap.

Should I use font-display swap or optional?

Use swap when your brand font must always appear. Use optional when avoiding layout shift matters more: the browser only uses the web font if it loads very quickly, otherwise it keeps the fallback for that visit. The font is typically cached for later pages.

Do I need to preload every font file?

No. Preload only the files used above the fold, usually one or two. Preloading many files competes with other important resources and can slow the page.

Can FunnelGuard detect FOUT?

Only partly. FunnelGuard checks CLS on monitored pages, so a big layout shift can be flagged, but it does not identify a font swap as the cause. You confirm the font behaviour yourself with browser DevTools.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: CLS only.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.