Files
musicmouse/slint-frontend/fonts/README.md
Martin Bauer ec9d617ad8 Vendor Nunito as a TTF so the device renders in the right face
Slint cannot read woff2, which is the only form web/public/fonts/ carries, and Raspbian
has no fonts-nunito to install instead - so the device was going to fall back to
DejaVu Sans, which is not what any of this was drawn in. The upstream variable TTF
(SIL OFL, weights 200-1000) is small enough to vendor and covers every weight the
design uses, including the 800/900 the headings lean on.

SLINT_DEFAULT_FONT takes one file and makes it the primary font. shell.nix now points
at this copy rather than at nixpkgs' own, so development and the device render from the
identical file, and the binary falls back to finding it beside the executable when
neither the dev shell nor the device's launcher has set the variable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 22:45:37 +02:00

10 lines
477 B
Markdown

Nunito, the face the design is drawn in, as a variable TTF.
`web/public/fonts/` has the same family as woff2, which is right for a browser and
useless here: Slint cannot read woff2. This is the upstream variable TTF (weights
200-1000), which `SLINT_DEFAULT_FONT` is pointed at - by `shell.nix` for development,
and by the launcher `roles/pi_slint_frontend` installs on the device.
Nunito is licensed under the SIL Open Font License 1.1:
https://github.com/googlefonts/nunito