TinyFont is a font/text package for TinyGo displays. It is heavily based on Adafruit's GFX library.
This package is experimental and may change in the future. It has not been optimized for speed or memory..
During compilation, tinygo will go through all the font files in a package and them discard them if not used. To improve compilation time considerably, move the files you are going to use to a new package.
The fonts compiled here were just converted or made compatible, and the original authors should be given proper credit. Each font is under its own license, and while most of them are under an open license, there might be differences in its usage and conditions.
You can use tinyfontgen to generate a tinyfont from a bdf/ttf font.
https://github.com/tinygo-org/tinyfont/tree/release/cmd/tinyfontgen
https://github.com/tinygo-org/tinyfont/tree/release/cmd/tinyfontgen-ttf
This package contains incompatible changes from previous versions.
- The argument has been changed from []byte to string.
- You can simply add a string() cast.
- The Font struct has been changed.
- If you are creating your own fonts, you need to modify them.
- You may find this script helpful for font conversion.
This project is licensed under the BSD 3-clause license, just like the Go project itself.