OptiWave | Doc
OptiWave · Fonts
Back to Website
Home / Fonts
Typography performance

Font Optimization

Self-host Google Fonts in WOFF2 format, inject font-display: swap, and eliminate CLS layout jumps with size-adjust fallbacks.

OptiWave Fonts tab showing font swap, preload, and Google Fonts mode settings
The Fonts tab with font swap, preloading, and Google Fonts self-hosting

Why font optimization matters

Unoptimized custom web fonts cause FOIT (Flash of Invisible Text) and layout shifts (CLS). OptiWave self-hosts Google Fonts locally to eliminate third-party DNS lookups.

Key Font Features

  • Self-Host Google Fonts - Downloads WOFF2 font files to wp-content/cache/optiwave/fonts/ and serves locally
  • Font Display Swap - Rewrites @font-face CSS to enforce font-display: swap
  • Size-Adjust Fallbacks - Injects font fallback metrics to prevent layout shifts (CLS) when fonts render
  • Font Preloading - Preloads critical above-the-fold WOFF2 font files in HTML <head>