Fonts Without the FOUT: 2,071 Google Fonts at Zero Layout Shift
How swift-rust/font/google pre-computes font metrics, subsets glyphs, and eliminates Cumulative Layout Shift automatically.
Web fonts are the single largest contributor to unexpected Cumulative Layout Shift (CLS) on modern web pages. When a remote font loads late, metric differences between the system fallback and the web font cause text blocks to reflow.
Swift Rust's font system (swift-rust/font/google and swift-rust/font/local) solves this at build time. Every font import generates scoped class names and CSS custom properties with metric-matched fallback descriptors.
Out of the box, we ship typed definitions for all 2,071 Google Fonts—including Geist, Geist Mono, Plus Jakarta Sans, Space Grotesk, Instrument Serif, and JetBrains Mono—plus 8 curated zero-network local font stacks.