Typography & font variables
styles/globals.scss exposes four CSS variables, one per use case. Never attach the wrong variable to a string.
Four variables
Hard limit on --font-display (GOTCHAS item 2)
ZELDA Free is a decorative font that only contains basic Latin. Using it for these scenarios breaks:
- Any CJK character → missing glyphs
- Accented Latin (é, ñ, ü, etc.) → occasional missing glyphs
- Translated strings (locale switching can introduce arbitrary Unicode)
- Blog titles
- User-submitted content
Safe uses: > LOADING, > READY, v1.2.0, other pure ASCII / Latin short strings.
Families and weights
Noto Serif SC 500 is unused in practice; data/site.ts.fonts.googleStylesheet no longer includes it.
Sizes, line-height, tracking
styles/globals.scss exposes a type scale (simplified):
Large HUD numbers use elastic rules like clamp(2.4rem, 4vw, 3.2rem) so they look reasonable on both large desktop and mobile.
Checklist for changing fonts
- Change
data/site.ts.fonts.googleStylesheetandcdnStylesheet - Run
node scripts/fetch-google-fonts.mjsto pull the new woff2 - Upload via coscli to
cos://shared/fonts/, settingContent-TypeandCache-Controlperwebsite/font-hosting - Verify with
curl -I - Open
http://dev.arsvine.com(withscripts/dev-host-setup.cmd) and visually check CJK / accented characters do not render as tofu