"""@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)