FOUT, short for flash of unstyled text, happens when a page uses a web font that hasn't downloaded yet. The browser shows the text in a fallback font, such as Arial or the system font, and switches to the web font once it arrives. For a moment, readers see the text change shape.
The name comes from a 2009 post by developer Paul Irish, describing how Firefox and Opera rendered pages with custom fonts at the time. Paul Irish
FOUT vs. FOIT
A browser waiting for a web font has two options: show the text in another font now, or hide it until the right font is ready.
- FOUT: the text appears right away in a fallback font, then swaps. Readers can start reading at once, but they may see a jump.
- FOIT, flash of invisible text: the text stays invisible until the font loads, or until the browser gives up waiting. The layout is in place, but there's nothing to read.
On a slow connection, FOIT can mean several seconds of blank space where the headline and article should be. That's why FOUT is usually the lesser problem: a brief change of font beats text nobody can read.
How font-display controls it
You choose the behavior with the font-display descriptor in your @font-face rule. The browser runs a short timeline for each font: a block period, when text using the font is invisible, then a swap period, when fallback text is shown and swapped as soon as the font arrives. After that, it sticks with the fallback. MDN
| Value | Text hidden for | Font swapped in | Result |
|---|---|---|---|
block |
2–3 seconds | any time | FOIT, then a possible FOUT |
swap |
0 ms | any time | FOUT; text always visible |
fallback |
100 ms | within 3 seconds, else never | short FOUT at most |
optional |
100 ms | no swap after that | no FOUT; the web font may be skipped on that visit |
auto |
varies by browser | varies | browser default |
Timings as web.dev lists them. web.dev
@font-face {
font-family: "Brand Sans";
src: url("/fonts/brand-sans.woff2") format("woff2");
font-display: swap;
}
Which value to pick depends on the font's job. For a logo or headline font where the look matters, swap keeps text visible and gets the brand font in. For body text, optional avoids any jump: if the font isn't ready almost at once, the reader simply keeps the fallback.
Why FOUT can hurt Core Web Vitals
The flash itself isn't the problem. The jump is. When the web font and the fallback take up different amounts of space, lines rewrap as the font swaps, and everything below moves. That movement counts toward Cumulative Layout Shift, one of the Core Web Vitals.
Delaying text has its own cost: while a headline waits for its font, it can also delay Largest Contentful Paint.
How to reduce FOUT
- Load fonts sooner. Put your
@font-facerules in the page's<head>instead of a late stylesheet. For one or two critical fonts, preload them. Use preload sparingly: it competes with other important files. - Make fonts smaller. Serve WOFF2 only, and drop characters you don't use.
unicode-rangelets the browser download a font file only when the page needs its characters. Check your font license before subsetting a font. - Match the fallback to the web font. The
size-adjustdescriptor scales a fallback font so it takes up about the same space as your web font. Then the swap barely moves anything. - Use fewer fonts. Every weight and style is another file. Two or three files load faster than eight.
- Use
optionalwhere the font isn't essential, so slow visits get no swap at all.
Test with a throttled connection in your browser's developer tools to see what readers on slow networks get. PageSpeed Insights shows the page's layout shift from real visits and from a lab test, so you can see whether a fix helped.