Fonts Without Regret: Fast Loads, No CLS
How fonts hurt LCP/CLS, when to preload, how font-display works, and practical strategies to avoid layout shift with good typography.
Frontend Interview Team
March 01, 2026
What you’ll learn
- Why fonts cause FOIT/FOUT and CLS
- When
preloadhelps - How to pick a strategy that’s fast and visually stable
30‑second interview answer
Fonts can delay text rendering and cause layout shifts. Use font-display to control fallback behavior, preload only the critical font files, subset and compress fonts (WOFF2), and reduce CLS by choosing fallback fonts with similar metrics (or using size-adjust where supported). The goal is: readable content fast, minimal layout movement.
Case study (real): frontendinterview.in
Quick lab snapshot on homepage and /blog:
- Homepage CLS: 0.00
- Blog CLS: 0.00
That’s exactly what we want: the UI isn’t shifting during load.
The takeaway isn’t “fonts never matter” — it’s that your current font strategy is stable. As you add more typography (different weights, more fonts, marketing sections), keep this same standard:
- reserve space (avoid swapping in fonts with wildly different metrics)
- preload only the fonts that affect above-the-fold content
The two main font problems
1) Slow text paint (LCP impact)
If your headline is the LCP element, fonts can directly affect LCP.
2) Layout shift (CLS)
When the web font loads late and swaps in with different metrics, lines reflow.
font-display in one table
block→ hides text briefly (FOIT) → can hurt perceived performanceswap→ shows fallback immediately (FOUT) → best for speed, can cause CLSoptional→ may skip font if slow → great for performance, style might differ
Most production sites start with swap and then fix CLS using metric-compatible fallbacks.
Preload (only when it’s critical)
If a font is needed for above-the-fold content:
<link
rel="preload"
href="/fonts/inter-var.woff2"
as="font"
type="font/woff2"
crossorigin
/>Don’t preload many fonts. It competes with CSS/JS/images.
CLS prevention strategies
Strategy A: Use a metric-compatible fallback
Pick a fallback font with similar x-height/width.
Strategy B: Reduce font variants
Less variants → fewer downloads.
Strategy C: Subset your fonts
Ship only the glyphs you need.
Common mistakes
- Preloading every font variant
- Serving TTF/OTF on the web (use WOFF2)
- Not using
crossorigin→ preload becomes ineffective
Production rule of thumb
- WOFF2 only
- Preload one critical font (if needed)
font-display: swap+ CLS-safe fallback metrics
Quick recap
- Fonts affect LCP and CLS.
- Preload sparingly.
- Use
font-displayintentionally and pick fallbacks that don’t shift layout.