Rainb
Rainb

Reputation: 2465

How do you use sans-serif fonts with typst?

Neither, Arial, Helvetica, or sans-serif, works.

#set text(font: (
  "sans-serif",
  "Helvetica",
  "Arial"
))

Some text.

some text not sans serif So what gives? How can I make my text sans-serif, which fonts are actually supported?

Upvotes: 3

Views: 5970

Answers (1)

Martin
Martin

Reputation: 916

You can check the list of supported fonts by clicking on the "Ag" button in the toolbar if you are using the web app.

Try

#set text(font: "TeX Gyre Heros")

or

#set text(font: "Inter")

for Helvetica-like fonts that come with the web app. If you'd like to bring your own fonts instead, you can upload a .ttf, .ttc, .otf, or .otc file into your project.

If you are using the local compiler instead, Typst will make all fonts of your system available. You can list them using the typst fonts command on the command line.

Upvotes: 5

Related Questions