etxt examples
This folder contains two subfolders:
gtxt
is the main examples folder. The code uses the generic etxt version (-tags gtxt
), but the techniques showcased have general applicability. This folder contains many simple examples that will help you get started.
ebiten
contains examples on how to use etxt with Ebitengine. The examples are mostly advanced, including animation effects, shaders and similar. I recommend starting with the examples in gtxt
instead.
As long as you have Golang installed, you can run the examples directly without any previous step. Almost all the programs expect one argument with a path to the font to use:
go run -tags gtxt github.com/Kintar/etxt/examples/gtxt/sizer_expand@latest path/to/your_font.ttf
For Ebitengine examples, don't use the gtxt
tag:
go run github.com/Kintar/etxt/examples/ebiten/typewriter@latest path/to/your_font.ttf
Below you can see the results of a few examples:
gtxt/aligns

gtxt/quantization

gtxt/outline

gtxt/mirror
