paylanon / godot-typst

Render Typst expressions in Godot 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Render Typst expressions in Godot 4

License:MIT License


Languages

Language:Rust 97.1%Language:GDScript 2.9%