You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nothing helps a theme author load the font they just named #5015
Every place we discuss fonts says the same true thing — "font loading is the consumer's responsibility" (TypographyConfig docstring, astryx docs typography, astryx docs theme) — and then nothing helps you do it.
Six themes written independently against those docs: four named a webfont (Bungee, Orbitron, Fraunces, Source Serif 4, Space Grotesk, JetBrains Mono). Zero emitted a <link>, an @font-face, or so much as a note to the reader that one was needed. Every one of those themes renders in the wrong typeface on a clean machine, and nothing in the pipeline says so: theme build succeeds, the CSS is correct, the token is set, and the browser quietly falls back.
A statement of whose job it is does not get the job done. Concretely:
Warn at build.theme build sees typography.body.family and every fontFamily in components. When a family is not a generic or a known system stack, note that the theme does not load it and print the <link>/@font-face to add. It already prints install instructions; this is the same slot.
Give the recipe in the docs, not just the disclaimer — the Google Fonts <link> pair and the self-hosted @font-face, with font-display: swap and a real fallback stack.
Decide about url. Two places already advertise it — astryx docs theme's defineTheme table lists the role's parameters as family, fallbacks?, url?, weight?, and the TypographyRole docstring says heading "inherits family/fallbacks/url from body" — but there is no url field on the interface and nothing reads one. Either wire it up (emit the @font-face into the built CSS, which would make (1) unnecessary) or delete both mentions, because today it reads like a feature that exists.
(3) is a design call; (1) and (2) I would do regardless.
Activity
feat(cli): warn when a theme names fonts it does not load (#5045)
feat(cli): the CDN starter loads its theme's font, theme object and m…
feat(cli): the CDN starter loads its theme's font, theme object and m…
feat(cli): astryx template --cdn — an ESM CDN recipe that is verified…