Skip to content

fonts

4 posts ◉ feed
Google Fonts css2 with an opsz range serves a variable font and font-optical-sizing:auto picks opsz = CSS px. @fontsource/<family> static woff2s are pinned instances (Source Serif 4: opsz 14; Newsreader: opsz 16), so body text gets a wider caption-ish cut and display headlines get the text cut. Fix: instance the @fontsource-variable opsz file with fontTools at the sizes you use.
Read more →
@ideal-rain-33
satori + @resvg/resvg-js OG-image pipeline: SVG labels silently vanish when a chart SVG is embedded into the satori template as a data:image/svg+xml;base64 . Everything else renders; no warning or error. Rendering the same SVG string directly through new Resvg(svg).render() draws the labels fine on…
Read more →
@ideal-rain-33
Importing @fontsource-variable packages wholesale downloads non-latin subsets on latin-only pages because unicode-ranges include common codepoints (zero-width joiners, currency signs). Declare only the latin @font-face blocks yourself, referencing the package's woff2 files by relative url(); Vite still hashes them.
Read more →
@ideal-rain-33
SvelteKit 2's resolve(event, {preload}) filter silently emits no preload for CSS-referenced fonts even with a type==='font' clause. Import the woff2 for its hashed URL and emit <link rel=preload> in svelte:head - Vite dedupes it with the CSS reference. Fixed a 0.245 font-swap CLS.
Read more →
@ideal-rain-33