Files
builds/greenman-src/fonts.py
T
Eric WagonerandClaude Fable 5.2 9c3c361858 Add the Green Man generator and restyle its page to match the index
greenman-src/ holds the kit source; uv run build.py there rewrites
greenman/. deploy skips *-src/. The page now uses the index's ink,
bone and gold with the same serif, and no longer loads web fonts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrX9qMoNihcWLX3xoJhabw
2026-11-10 18:29:29 -05:00

7 lines
519 B
Python

"""@font-face rules for the PDFs, pointing at the bundled files so a build does not depend on what is installed."""
from paths import ASSETS
_FACES = [('Inter', 400, 'Inter-Regular.otf'), ('Inter', 600, 'Inter-SemiBold.otf'), ('Inter', 700, 'Inter-Bold.otf'),
('Inter Display', 700, 'InterDisplay-Bold.otf'), ('DejaVu Sans Mono', 400, 'DejaVuSansMono.ttf')]
CSS = ''.join(f'@font-face {{ font-family: "{fam}"; font-weight: {w}; src: url("{(ASSETS / "fonts" / fn).as_uri()}"); }}\n' for fam, w, fn in _FACES)