fallback font
The locally installed font shown until a web font loads, or if it fails.
In more detail
If the fallback has different letter widths and heights, text reflows when the web font arrives. Adjusting the fallback's metrics with size-adjust and related descriptors makes the swap almost invisible.
Example
next/font generates an adjusted fallback font automatically.Related terms
- size-adjust — A CSS @font-face setting that scales a font's glyphs, used to make a fallback font take up the same space as the web font.
- web font — A font file downloaded by the page, declared with @font-face, instead of one already installed on the user's device.
- flash of unstyled text — The moment when text first appears in a fallback font and then jumps as the web font loads.
Taught in
- Image & Font Optimization: Zero Layout Shift Assets — Next.js 15 & Modern App Router Architecture