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.
- Page loadsHTML and CSS arrive
- Fallback text paintsArial or Times shows first
- Web font swaps inWider letters, new line breaks
- Button movesVisitor taps the wrong spot
The break happens at the swap: text reflows and the call to action moves.
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
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.
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.
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.
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.
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.
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.
Choose font-display
Use
swapif you want the web font always shown. Useoptionalif 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.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.
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.
@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;
}<link rel="preload" href="/fonts/brand-regular.woff2" as="font" type="font/woff2" crossorigin>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).
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.
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.
Preload in theme.liquid
In Online Store > Themes > Edit code, open layout/theme.liquid and add a preload link inside the head, using the font's asset URL from Liquid's font_url filter if you use the theme font picker.
Add the fallback CSS
Add the fallback @font-face and font-family rule in your theme's base CSS file. Many Shopify themes already set font-display: swap for you.
Upload fonts
In Site settings > Fonts, upload your WOFF2 files and set font-display to Swap or Optional if the option is shown.
Add the fallback and preload
In Site settings > Custom code (Head code), paste the preload link and the fallback @font-face. Then add the fallback name to the font stack in your Style panel.
Limit custom fonts
Wix controls font loading, so you have limited options. Use fewer fonts and weights, and prefer fonts from the Wix font list, which it serves for you.
Add custom code if allowed
On plans that allow custom code, add head code through Settings > Custom code. Test the result, as Wix may not let you change every font rule.
Use built-in fonts where possible
Pick fonts in Site Styles > Fonts. Fewer weights means fewer files to load.
Add the fallback CSS
In Pages > Custom CSS, add the fallback @font-face and font-family override. Use Code Injection for a preload link, if your plan supports it.
Self-host WOFF2 files
Serve fonts from your own domain with long cache headers, then add the preload link and the CSS from the snippets above.
Calculate fallback values
Use a font metrics tool or your build tooling (some frameworks, such as Next.js, generate fallback metrics automatically for fonts they load) to get size-adjust and override values.
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
- 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.
- 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.
Related issues
- PRF-093No font-display: swap on web fontsFix guide
- PRF-091FOIT: text invisible for seconds while fonts loadFix guide
- PRF-094Too many font weights/families loaded (8+ files)Fix guide
- PRF-090Font file fails to load (404/CORS) falling back to system fontFix guide
- PRF-095Icon font fails so icons render as squares/tofuFix guide
- PRF-096Icons missing from buttons (blank button)Fix guide