/godot-typst

Render Typst expressions in Godot 4

Primary LanguageRustMIT LicenseMIT

logo

Render Typst expressions in Godot 4

Requires godot-rust and Typst

ABOUT

A robust $\TeX$ alternative, directly in your Godot application.

Inspired by GodoTeX. Works similarly by providing custom TextureRect and Sprite2D nodes that renders Typst expressions, continually updated at runtime.

godot-typst

INSTALLATION

(1) Ensure Typst is installed to system.

$ typst --version

(2) Add this crate as a dependency to your godot-rust project. In Cargo.toml:

[dependencies]
godot-typst = { git = "https://github.com/paylanon/godot-typst" }

(3) Import the TypstTextureRect and TypstSprite classes to automatically add them to Godot. Ignore warning.

In lib.rs:

use godot_typst::TypstTextureRect;
use godot_typst::TypstSprite;

Done!

Find the example project at example/typst_project in this repo.