font-display
The @font-face setting that controls what text shows while a web font loads: invisible, a fallback font, or the fallback permanently if the font is late.
In more detail
swap shows fallback text at once and swaps in the web font later, which can shift layout. optional uses the web font only if it arrives almost immediately, avoiding the shift.
Related terms
- web font — A font file downloaded by the page, declared with @font-face, instead of one already installed on the user's device.
- Cumulative Layout Shift — A Core Web Vital scoring how much visible content unexpectedly jumps around while a page is in use.
Taught in
- Core Web Vitals: Measuring And Optimizing LCP, INP, And CLS — Frontend Architecture & Web Platform