TinyFont is a font/text package for TinyGo displays. It is heavily influenced by Adafruit's GFX library.
This package is experimental and may change in the future. It has not been optimized for speed or memory.
A monospaced serif font from the GNU FreeFont project. Available in regular, bold, oblique, and bold oblique styles at 9, 12, 18, and 24pt. Licensed under GPL v3.
A sans-serif font from the GNU FreeFont project. Available in regular, bold, oblique, and bold oblique styles at 9, 12, 18, and 24pt. Licensed under GPL v3.
A proportional serif font from the GNU FreeFont project. Available in regular, bold, italic, and bold italic styles at 9, 12, 18, and 24pt. Licensed under GPL v3.
A decorative font featuring Go gopher-themed glyphs, created by @rakyll. Available at 14, 18, 22, 32, 58, and 121pt. Licensed under CC BY-NC 4.0.
Google's Noto Emoji font, providing a wide range of emoji glyphs. Available at 12, 16, and 20pt. Licensed under SIL Open Font License.
Google's Noto Sans font, designed to support text in all languages with a clean sans-serif appearance. Available at 12pt. Licensed under SIL Open Font License.
The classic Proggy programming font, a pixel-perfect monospaced bitmap font well suited for small displays. Available at 8pt.
The Shinonome (東雲) bitmap font family, a Japanese BDF bitmap font supporting Latin and JIS character sets. Available at 12pt. Licensed under a permissive open license from The Electronic Font Open Laboratory.
Org_v01 by Orgdot. A tiny, stylized font with all characters fitting within a 6-pixel height.
Picopixel by Sébastien Matos. A tiny pixel font with all characters fitting within a 6-pixel height.
"Tiny3x3a" from FontStruct by Michaelangel007. An extremely compact 3×3 pixel font. Licensed under CC BY-NC-SA 3.0.
Tom Thumb, a 3×5 pixel monospaced bitmap font originally by Brian J. Swetland. One of the smallest legible fonts available. Licensed under the BSD 3-Clause License.
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
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.
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.
- Program code: Licensed under the BSD 3-Clause License, same as the Go project.
- Fonts: Each font is licensed under its own terms. Some allow commercial use, others (e.g., CC BY-NC, GPL) have restrictions.
Please check the license file in each font's directory before use, especially for commercial projects.












