github.com/Kintar/etxt@v0.0.0-20221224033739-2fc69f000137/examples/README.md (about)

     1  # etxt examples
     2  This folder contains two subfolders:
     3  - `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.
     4  - `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.
     5  
     6  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:
     7  ```
     8  go run -tags gtxt github.com/Kintar/etxt/examples/gtxt/sizer_expand@latest path/to/your_font.ttf
     9  ```
    10  
    11  For Ebitengine examples, don't use the `gtxt` tag:
    12  ```
    13  go run github.com/Kintar/etxt/examples/ebiten/typewriter@latest path/to/your_font.ttf
    14  ```
    15  
    16  Below you can see the results of a few examples:
    17  
    18  ### gtxt/aligns
    19  ![](https://github.com/Kintar/etxt/blob/main/docs/img/gtxt_aligns.png?raw=true)
    20  
    21  ### gtxt/quantization
    22  ![](https://github.com/Kintar/etxt/blob/main/docs/img/gtxt_quantization.png?raw=true)
    23  
    24  ### gtxt/outline
    25  ![](https://github.com/Kintar/etxt/blob/main/docs/img/gtxt_outline.png?raw=true)
    26  
    27  ### gtxt/mirror
    28  ![](https://github.com/Kintar/etxt/blob/main/docs/img/gtxt_mirror.png?raw=true)