Why WOFF2 Brotli Preprocessing Outperforms Raw Font Compression
Inside glyf/loca Table Transformation and Shared Brotli Dictionaries
Serving raw desktop .ttf files over HTTP wastes critical First Contentful Paint bandwidth even when CDN gzip or Brotli transport is enabled. The W3C WOFF2 format achieves 30% to 60% smaller payloads by structurally transforming TrueType tables before entropy coding: redundant glyph bounding boxes are stripped, loca offset tables are eliminated, contour point deltas are grouped into homogeneous byte streams, and all tables share a single Brotli compression window.
Executing Google’s reference WOFF2 encoder compiled to WebAssembly inside an isolated browser Worker lets engineering teams package SIL Open Font License or licensed commercial fonts without uploading unreleased brand assets to third-party servers. Every compressed output is verified for exact header length parity and lossless glyph metric preservation.
- Produces standards-compliant wOF2 binaries supported by 98%+ of modern browsers.
- Preserves OpenType GSUB ligatures, GPOS kerning, variable fvar/gvar axes, and CFF tables.
- Chains directly with harfbuzz-subset.wasm for optional Unicode range or headline subsetting.
- Pairs WOFF2 outputs with zero-CLS @font-face fallback CSS descriptors.