mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
The API reference asked fonts.scalar.com for 13 webfonts on every load. Our CSP is font-src 'self' data:, so all 13 were blocked — 13 failed requests, 13 console errors, and type that silently fell back to whatever the OS happened to have, on our most public developer-facing page. Naming Geist in a font stack did not fix it: nothing self-hosted it, so @font-face resolved to an empty list and Geist only appeared for people who happened to have it installed. Measuring the live page is what caught that. Now the fonts actually ship: Geist-Variable.woff2 and GeistMono-Variable.woff2 beside the bundle. One VARIABLE file per family covers weights 100-900, so the whole thing is two same-origin requests (~141KB) instead of ten static cuts. Wired through Scalar's own seam — it reads --scalar-font / --scalar-font-code everywhere it sets type, so overriding those two properties beats an !important war against its selectors and survives a bundle upgrade. Deleted the 13 dead @font-face blocks from the vendored bundle rather than leaving them neutered: 15 font declarations where 2 suffice is the same complecting in miniature. Two rules, one place. Verified the bundle still parses and that the reference directory now contains ZERO external hosts.