Skip to content

Nothing helps a theme author load the font they just named #5015

Closed

Description

@cixzhang

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:

  1. 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.
  2. 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.
  3. 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

  1. self-assigned this
    on Aug 14, 2026
  2. added 4 commits that reference this issue on Aug 15, 2026
    3afdd73
    2620854
    9ba3a15
    ac850d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions