Comparison
font-displayvsFont subsetting
font-display
the text was invisible for a moment while the webfont loaded, then appeared all at once.
The descriptor controlling what the browser shows while a webfont is loading: nothing (a flash of invisible text), a fallback that is later swapped (a flash of unstyled text), or the fallback permanently. `swap` gets text on screen immediately at the cost of a visible reflow when the real font arrives. Matching the fallback's metrics to the webfont with size-adjust descriptors is what turns that reflow from a jolt into something barely noticeable.
Full entry →Font subsetting
you shipped only the Latin characters and the font file went from 300 kilobytes to 30.
Stripping a font file down to the glyphs a site actually uses, or splitting it by `unicode-range` so the browser only downloads the ranges the page needs. Fonts are frequently the largest render-blocking assets on a content site, and most of every file is scripts nobody on that page will type. The risk is over-subsetting: a missing glyph falls back to a completely different face mid-sentence.
Full entry →