typst: Failure to select right font variant
When using the following fonts, Typst fails to select the right variant.
QuadraatPro.otf
QuadraatPro-Ita.otf
QuadraatPro-Demibold.otf
QuadraatPro-DemiboldItalic.otf
QuadraatPro-Bold.otf
QuadraatPro-BoldIta.otf
#set text(font: "Quadraat Pro")
selects Quadraat Pro Italic. I did not manage to get the Regular style. Names in the system are: Regular, Italic, Demibold, Demibold Italic, Bold, Bold Italic.
_Originally posted by @owiecc in https://github.com/typst/typst/issues/185#issuecomment-1483411869_
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 15 (8 by maintainers)
I have a similar problem with googles Rubik font. It shows up as installed in Windows with numerous variants, but
typst fonts --variants
only finds one normal and italic. Consequently, specifying the font weight changes nothing.That makes sense. I don’t really know which of these fonts are fixed and which are not, so if someone knows that a particular fonts is still unfixed, feel free to open an issue for that one.
This issue has become the-issue-to-points-to of font selecting problem, and PR #3228 now provides a mechanism to solve the it. I propose to close this issue, and open per-font issue separately, to track whether a font with wrong metadata has been added to exception list. cc @Enivex
Using “Source Sans Pro” in the online editor works, i.e.,
*strong*
causes a bold font. On my machine, the same code does not produce a bold font (I even manually installed the bold variant).The following fonts are found with
typst fonts --variants
, which looks a little odd to me: