font-display Generator

Compare and generate every font-display strategy. Understand the exact loading behaviour, invisible-text timing, and Core Web Vitals impact for swap, fallback, optional, block, and auto.

Comparison table

StrategyInvisible textFallback periodSwap windowBest for
swap0msImmediateUnlimitedBody text, headlines
fallback100ms100ms~3sBalanced content
optional100ms100msNone (first visit)Zero CLS
block~3s3sUnlimitedIcon fonts only
autoVariesVariesVariesNot recommended
Recommendation: Use swap for body text and headings users need to read immediately. Use optional if you cannot accept any layout shift. Never use block for text content — invisible text for 3s is a critical LCP failure.

Frequently asked questions

What is the best font-display strategy?

swap is the correct choice for body text. optional gives zero layout shift but users on slow connections may never see the custom font. block should only be used for icon fonts.

Does font-display affect Core Web Vitals?

Yes. swap minimizes LCP delay. block can severely harm LCP because text is invisible during the block period. optional has the smallest CLS impact but may sacrifice custom font display on slow connections.

What is FOIT and FOUT?

FOIT (Flash of Invisible Text) is when text is invisible while the font loads — caused by block. FOUT (Flash of Unstyled Text) is when fallback text shows first then swaps — caused by swap. FOUT is universally preferred over FOIT.

Is font-display: auto ever a good choice?

Rarely. auto delegates to browser heuristics, which differ between Chrome, Safari, and Firefox. Behaviour is unpredictable. Explicitly choosing swap is more reliable.

Related tools