Support font stacks with _brand.yml #13930
mdekstrand
started this conversation in
Feature Requests
Replies: 2 comments 11 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
rev 3ba0378f08 of my Notes repo is broken: https://codeberg.org/mdekstrand/nods.ekstrandom.net/src/commit/3ba0378f08bbfb50acaff04bb40da560087ab3ca
typography:
fonts:
- family: Fira Sans
source: bunny
weight: [200, 300, 400, 500, 700]
- family: Fira Mono
source: bunny
- family: Chakra Petch
source: bunny
weight: [400, 500, 700]
base: "'Fira Sans', sans-serif"
headings: "'Chakra Petch', cursive"
monospace: "'Fira Mono', monospace"
monospace-inline:
size: 1emA few variants are also broken (e.g., without quotes: This is with Quarto 1.8.27. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Description
Right now, there does not seem to be a way to properly use font stacks with
_brand.yml. I raised this in posit-dev/brand-yml#111, but learned it seems to be a Quarto-specific issue.Specifically, the font
family:options only take a single string, so you cannot specify a stack as a YAML list.Specifying the font stack in CSS syntax in the
family:passes the stack through to CSS correctly, but has at least two problems:fontslist does not match the name of a used font, its CSS import seems to be excluded from the generated CSS. Whatever code is responsible for this does not seem to understand CSS font stack syntax.Font stacks are useful even when using a specific web font for at least two reasons:
I can work around this by putting my font stack directly into custom CSS, but was surprised when writing a font stack in
_brand.ymlcaused my web font imports to be excluded (so the site looked correct inquarto previewon my laptop that happened to have the fonts installed as system fonts, but not on other machines).Beta Was this translation helpful? Give feedback.
All reactions