#8896·typst

PNG export runs out of memory when `--ppi` is not specified (regression since #8496, `c0b6245e`)

Author: DevlinNulCreated Sep 26, 2026Updated Sep 28, 2026
Labelsbugpngurgentregression

Description

The PNG exporter runs out of memory when exporting arbitrary documents, unless --ppi is explicitly specified. This is a regression introduced by c0b6245e (PR #8496).

Bisection result:

  • First bad commit: c0b6245e4c05b03c4c0f6ae51a32b73bd5838bda — Set rules for default document format options (#8496)
  • Last good commit: 0a65e9abe (direct parent of c0b6245e)

Both verified manually: 0a65e9abe exports normally, c0b6245e OOMs.

Reproduction:

typ
// test.typ
Hello.
bash
typst compile test.typ -f png

The process runs out of memory and is killed. However, the following all work:

bash
typst compile test.typ -f png --ppi 300
typst compile test.typ -f png --ppi 144.0
typst compile test.typ -f png --ppi 144

Any explicitly specified ppi avoids the OOM, even values higher than the default. Notably, explicitly specifying the same ppi as the default also avoids the OOM. Only the "no --ppi given" path triggers it.

Operating system

No response

Typst version

  • I am using the latest version of Typst