Vector & CSS Delivery Formats

CSS @font-face & Metric Overrides

CSS Fonts Module Level 4 defines @font-face declarations, unicode-range chunk loading, font-display timelines, and metric overrides (size-adjust, ascent-override) that eliminate Cumulative Layout Shift.

.csstext/cssUpdated:
CompressionText / optional gzip
Outline / CurveCSS / Data URI Text
Browser supportUniversal (Web + OS)
OpenType GSUB/GPOSYes

Strengths

  • Lets browsers download only matching unicode-range font slices for active page characters
  • size-adjust and ascent/descent-override match system fallback proportions to eliminate CLS jump
  • Self-hosted CSS eliminates external Google Fonts CDN tracking for GDPR compliance

Trade-offs

  • Incorrect ascent/descent or missing unicode-range declarations cause FOIT/FOUT flicker or fallback mismatch
  • Requires accurate OS/2 vs hhea metric calculations per fallback font family

Convert & optimize CSS @font-face locally

Related engineering guides

All 18 guides

CSS @font-face frequently asked questions

How does size-adjust stop font Cumulative Layout Shift (CLS)?

size-adjust scales the local fallback font's x-height and advance width to match your webfont so line breaks and paragraph heights stay identical during swap.

Which font-display value should I use in production?

font-display: swap shows text immediately with fallback metrics and swaps seamlessly when combined with size-adjust overrides; optional prevents swaps on slow links.

Why pair @font-face CSS with link rel=preload?

Preloading primary above-the-fold WOFF2 files starts the font fetch alongside HTML/CSS parsing instead of waiting for stylesheet discovery.

Authoritative References

Explore other font formats

All 12 formats →