examples/

directory
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2022 License: MIT

README

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL