Change font-display and toggle preload, watch text go invisible (FOIT) or swap (FOUT) live. An interactive font-display & FOIT vs FOUT playground: change the…
On a slow connection the wrong font-display hides text for 3 seconds and visitors think the page is broken. Wrong the other way, content jumps when the font comes in, CLS rises and people mis-click. Knowing the block and swap periods, plus size-adjust, keeps your page quick to read and still.
font-display trades invisible text for a jump
font-display: block (or the default auto) without knowing The browser default works like block: text is invisible for up to 3 seconds on a slow connection. For body text that must be readable fast, write swap, fallback or optional explicitly.swap makes CLS worse because the layout jumps at the swap Make a fallback @font-face from a local font with size-adjust (plus ascent-override/descent-override if needed) so its width matches the web font. Or use optional when no jump is acceptable.preload replaces font-display preload only starts the download earlier. Until the font arrives, how text is painted is still set by font-display. Use both together.block, a 3000 ms download, then play The text is transparent until the letters arrive: the banner looks blank though the content is there. That is FOIT.swap and play past the moment the letters arrive The fallback shows at once, then the letters swap and the "Read next" card jumps. That is FOUT, and that jump is what CLS counts.optional with a slow download The letters arrive after 100 ms, so the fallback is kept: no vanishing text, no jump. The pixel letters are used on the next visit.swap, tune size-adjust until the jump is 0 px The fallback’s glyphs grow until their width matches the pixel letters: lines break in the same places, the card stays.