Select default style of variable font family #9716
-
DescriptionHi folks, Hopefully this isn't a duplicate, but is there a way to select the default style (e.g. "light" instead of "regular") for variable font families? I'm specifically interested in a solution for the Typst engine, but hopefully the answer would apply more generally. Perhaps a P.S. My rather hackish workaround at the moment is to download the font family of interest (i.e.,including all styles), but then only copy across the subset of selected styles to my system font book. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Did you look at Typst documentation? https://typst.app/docs/ Then you'll likely need to tweak the partials: https://quarto.org/docs/output-formats/typst-custom.html#advanced-customization For other formats, the approach is the same and require to know the language used as there is no direct YAML option for this in Pandoc and Quarto. |
Beta Was this translation helpful? Give feedback.
-
Thanks @mcanouil. Looks like this lacks upstream support in Typst at the moment, regardless of custom partials. typst/typst#185 I'll stick with my workaround for the moment and hopefully revisit once Typst gets better native support for variable fonts. |
Beta Was this translation helpful? Give feedback.
-
UPDATE: For most variable fonts, I've found that setting the weight "manually" as part of For example, here using the Amazon Ember fonts (zip link): format:
typst:
mainfont: "Amazon Ember Cd RC"
include-before-body:
- text: |
#set text(font: "Amazon Ember Cd RC", weight: "light") ... unfortunately, this doesn't pertain to any pre-body elements like the abstract. So these elements will still be in the regular font, rather than the variable option that you specified as part of your yaml (here: "light" weight). |
Beta Was this translation helpful? Give feedback.
Did you look at Typst documentation? https://typst.app/docs/
Then you'll likely need to tweak the partials: https://quarto.org/docs/output-formats/typst-custom.html#advanced-customization
For other formats, the approach is the same and require to know the language used as there is no direct YAML option for this in Pandoc and Quarto.