typstgenv0.3.0

← All examples

Bundled fonts

Sets each font family that typstgen bundles, including math and code. Compiled with system fonts turned off.

Bundled fonts

examples/fonts.typ
// Uses only the fonts that typstgen bundles, so it renders without any
// installed fonts (use_system_fonts = false in typstgen.toml).
#set page(paper: "a5", margin: 18mm)
#set text(size: 10.5pt)

= Bundled fonts

== Libertinus Serif
#text(font: "Libertinus Serif")[
  The quick brown fox jumps over the lazy dog. *Bold*, _italic_, *_both_*.
]

== New Computer Modern
#text(font: "New Computer Modern")[
  The quick brown fox jumps over the lazy dog. *Bold*, _italic_, *_both_*.
]

== New Computer Modern Math
$ integral_0^infinity e^(-x^2) dif x = sqrt(pi) / 2 $

== DejaVu Sans Mono
```rust
let pdf = typstgen::compile(input, &config)?;
```

This browser does not show PDFs inline. Use the links below.

Open fonts.pdf · Download fonts.pdf (46.4 KiB)

  • fonts
  • math
  • A5