Font selection issue

Why does the following example not show the correct font style, provided that all variants are installed?

#let font = { "Helvetica" }

#block(width:15cm)[*Typst version:* #sys.version \ \
#text(font: font, style: "normal", weight: "bold", size: 32pt,
	fill: rgb(0,0,0,0), stroke: 0.5pt + blue, font)

#text(font: font, style: "oblique", weight: "bold", size: 32pt,
	fill: rgb(0,0,0,0), stroke: 0.5pt + blue, font)]

#text(font: font, style: "italic", weight: "bold", size: 32pt,
	fill: rgb(0,0,0,0), stroke: 0.5pt + blue, font)

result

They must be “incorrectly” installed? The same code on my typst 0.12 shows the correct styles.

You can execute typst fonts --variants to check which font styles typst has found on your system.

Hi @dezifit, thanks for your question! Could you maybe try to revise your post’s title so others can find it easier in the future? The question guidelines recommend a complete question:

Good titles are questions you would ask your friend about Typst.

Also, please add relevant tags such as fonts and move it to the Questions category (I’m actually not sure if you can change that yourself; if not, I can do it for you.

Ok, for Helvetica this only lists:

Helvetica
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)

and indeed, I had them in a LaTeX specific folder. After moving them to a system wide directory the output is as expected. Thanks for your help.

2 Likes

A note on “moving the fonts”. You probably don’t need to move the latex fonts to a system wide directory. A symbolic link works fine.