https://github.com/fel88/gfxfonttool
GFX font viewer/generator for Arduino TFT
https://github.com/fel88/gfxfonttool
adafruit arduino cyrillic gfx tft utf8
Last synced: 3 months ago
JSON representation
GFX font viewer/generator for Arduino TFT
- Host: GitHub
- URL: https://github.com/fel88/gfxfonttool
- Owner: fel88
- License: mit
- Created: 2022-08-03T18:40:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-26T17:21:13.000Z (almost 2 years ago)
- Last Synced: 2024-12-01T07:37:35.691Z (5 months ago)
- Topics: adafruit, arduino, cyrillic, gfx, tft, utf8
- Language: C#
- Homepage:
- Size: 207 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GFXFontTool
GFX font viewer/generator for Arduino TFT
## How to use:
## 1. Generate font:
1. Open generator
2. Open font selector ('font' button) and select font
3. 'Export font' to .h file (e.g 'font1.h')Optionally, you can specify the generation ranges ('+add range' button).
**Example for cyrillic:**
Ranges: 0x00-0xC8, 0x410-0x500
## 2. Using generated font. Arduino sketch (with TFT_eSPI):
```
#include
#include "font1.h"; // include generated fontTFT_eSPI tft = TFT_eSPI();
TFT_eSprite sprite = TFT_eSprite(&tft);// set font
tft.setFreeFont(&exportFont); // for TFT
sprite.setFreeFont(&exportFont); // for specific sprite// print static UTF8 string
tft.print("Test");
sprite.print("Test"); // for specific sprite//print from string variable
String text="Test";
tft.print(text.c_str());
sprite.print(text.c_str());
```## References:
* https://github.com/immortalserg/AdafruitGFXRusFonts
* https://glenviewsoftware.com/projects/products/adafonteditor/adafruit-gfx-font-format/