- It's pretty fast!
- Editor Integration
- Inherits all Functionality from
Sprite
- Adjustable Font Size
- Adjustable Font Color
- Anti-Aliasing (with Toggle)
The add-on is tested for Godot 4.1.x and is expected to run on > 4.1. There is also a branch for Godot 3, which was tested for 3.5.x and is expected to run on 3.x. It supports Windows and Linux. MacOS is tested by the community and pull requests are welcome.
A custom node LaTeX
() inheriting from Sprite
is provided and may be instanced like any other. It has the following properties, which may be updated in the editor or programmatically at runtime
- LatexExpression: A
string
containing the expression to be rendered. If invalid, the corresponding error message will be rendered instead. - FontSize: A
float
, the font size in points. It essentially controls the resolution of the rendered image. Decrease for better performance, increase for higher fidelity. - MathColor: A Godot
Color
, the typeface's color. - AntiAliasing: A
bool
. The renderer may or may not be instructed to anti-aliase the rendered typeface. Note that this is distinct from Godot's own anti-aliasing.
When updating these in the editor, the expression is automatically rendered anew. When updating properties programmatically, you decide yourself when to render by calling the .Render()
method - to save ressources. Rendering very often (several times a millisecond) may result in errors.
There is also a LaTeXButton
() node for clickable expressions. This behaves like a TextureButton
.
Further, a special node for usage in 3D is provided - LaTeX3D
().
For a list of LaTeX examples that can be rendered, see here.
A demo is available here.
- Create a Godot Mono project and build a C#-script.
- Install from the Godot Asset Store from inside the Engine or by cloning. When including in an existing project, you won't need the
*.godot
and*.sln
. - The add-on depends on
CSharpMath.SkiaSharp
, licensed under MIT, as a nuget package. You integrate this into your existing Godot Mono project by copying the<ItemGroup>
-tags into your project's.csproj
-file fromGodoTeX.csproj
. - Enable the addon in the settings, as usual. You can now create a
LaTeX
node and start your math excapades!
Licensed under MIT. © 2022-2023 fi-le