tinygo-org / tinyfont

Text library for TinyGo displays
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
49 stars 12 forks source link
adafruit arduino arm golang gpio hacktoberfest i2c microbit microcontroller nrf51 nrf52 nrf52840 samd21 samd51 spi stm32 tinygo

TinyFont

Build

TinyFont is a font/text package for TinyGo displays. It is heavily based on Adafruit's GFX library.

example example

This package is experimental and may change in the future. It has not been optimized for speed or memory..

Faster compilation

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.

About the fonts

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.

Generate your own font

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

Incompatibility warning

This package contains incompatible changes from previous versions.

License

This project is licensed under the BSD 3-clause license, just like the Go project itself.