Typst Guide

Typst Fonts

Use #set text(font: "...") for the document font. #text(...) for inline overrides. System fonts work directly.

The basics

// Document-level font
#set text(
  font: "Times New Roman",
  size: 12pt,
)

// Inline override
#text(font: "Arial", size: 14pt)[a different font here]

// Font fallback list (try first, then second, then third)
#set text(font: ("Times New Roman", "Liberation Serif", "DejaVu Serif"))

// Bold and italic via markup
This is *bold* and _italic_ and *_bold italic_*.

// Specific weight
#text(weight: 700)[700 weight]
#text(weight: "extralight")[200 weight]

Font for body vs headings

#set text(font: "Times New Roman", size: 11pt)

// All headings in a different font
#show heading: set text(font: "Helvetica")

// Or only level-1 headings
#show heading.where(level: 1): set text(
  font: "Helvetica",
  size: 18pt,
  weight: "bold",
)

Common font choices for academic writing

Use caseFont
Default (LaTeX-like)"New Computer Modern"
Journal manuscript"Times New Roman"
Modern thesis"Libertinus Serif"
Sans-serif body"Helvetica" or "Arial"
Code / monospace"Source Code Pro" or "Fira Code"
Math (auto with body)"New Computer Modern Math"

Common mistakes

  • Using a font that's not installed. Typst silently falls back to default. Provide a fallback list to be safe.
  • Quoting font names with single quotes. Typst requires double quotes: font: "Times New Roman".
  • Forgetting the #set for global changes. Without #set, text(...) only applies to its argument.
  • Mixing weight types. Numeric (100-900) or named ("regular", "bold", "light") — pick one style and be consistent.
Try Typst with custom fonts

TypeTeX bundles common academic fonts (Times New Roman, Arial, Helvetica, Libertinus, Computer Modern) so you don't have to install anything. Drag .otf/.ttf files into your project for custom fonts.

Start writing in Typst

Frequently Asked Questions

How do I change the font in Typst?

Use #set text(font: "Font Name") at the start of your document. This applies to all text. For one-time overrides, use #text(font: "Other Font")[some text]. Typst uses the same font names you'd see in any operating system: 'Times New Roman', 'Arial', 'Helvetica', 'Computer Modern', 'New Computer Modern' (Typst's default).

What's the default font in Typst?

Typst uses 'New Computer Modern' (a modernized version of LaTeX's Computer Modern) for the body and 'New Computer Modern Math' for math. These are bundled with Typst — no install needed. They look similar to LaTeX's CM but with better rendering at low resolutions.

How do I use Times New Roman in Typst?

#set text(font: "Times New Roman", size: 12pt). This works if Times New Roman is installed on the compile machine. Typst-the-CLI uses system fonts; TypeTeX (browser) bundles common fonts including Times New Roman so it works without local install.

How do I set the font size in Typst?

#set text(size: 12pt) for the document size. Inline override: #text(size: 14pt)[bigger]. Sizes can be in pt (points), em (relative to current size), mm/cm, or fractions. Default is 11pt.

How do I make text bold or italic in Typst?

Bold: *text* (markdown-style asterisks) or #text(weight: "bold")[text]. Italic: _text_ or #text(style: "italic")[text]. Both at once: *_text_*. For specific weights: #text(weight: 700)[700 weight], using the OpenType weight scale (100-900).

How do I provide a font fallback list?

Pass an array to font: #set text(font: ("Times New Roman", "Liberation Serif", "DejaVu Serif")). Typst tries each in order and uses the first available. Useful for portability — falls back to a similar-looking font if the preferred one isn't installed.

How do I upload a custom font in Typst?

On Typst CLI: pass --font-path /path/to/fonts when compiling. In TypeTeX, drag .otf or .ttf files into your project — they're available immediately. Reference by the font's PostScript or family name. Typst supports OTF, TTF, and TTC font formats.

How do I set different fonts for body and headings?

#set text(font: "Body Font") // base. Then #show heading: set text(font: "Heading Font") to override for headings only. You can target specific levels: #show heading.where(level: 1): set text(font: "...").

How is Typst font handling different from LaTeX?

Much simpler. No \usepackage{fontspec} + \setmainfont{} dance, no choosing between pdfLaTeX/XeLaTeX/LuaLaTeX based on font support. Typst's font handling is unified — you just pass a font name. System fonts work directly, math fonts auto-pair with text fonts, and there's no 'mismatched math' problem.

More Typst guides