I noticed that the TomThumb.h font included in the Adafruit GFX library has characters that have different widths, which is a problem for me because I'm doing text processing that requires characters to have the same dimensions (width and height). I also noticed that the TomThumb.h font misses some characters (such as ') and so on. I need a way to create/edit fonts for the Adafruit GFX (where I'm using the Adafruit_ST7735 on a 1.8" TFT Display). I've looked around the internet but I couldn't find anything decent.
3 Answers
I found an online editor that can parse Adafruit GFX font headers, modify, and export the result to create a new font header. It works very well. May be a bit late to help OP, but for anyone else looking...
It uses regexes to extract info from the header files, so it's pretty strict on following the layout of GFX font headers provided by Adafruit.
webpage: https://tchapi.github.io/Adafruit-GFX-Font-Customiser/
github: https://github.com/tchapi/Adafruit-GFX-Font-Customiser
One possible solution you might already have: There’s a small utility called fontconvert
that’s part of the Adafruit GFX library. The source code is installed by default together with the Adafruit GFX library in Arduino/libraries/Adafruit_GFX_Library/fontconvert
You need Linux to compile it from the provided source code. It also compiles and runs on a Raspberry Pi.
It takes care of converting TrueType fonts (completely or partially) to Adafruit GFX format. There’s some documentation on compiling and using it in the fontconvert directory.
-
Thanks, I found it. Unfortunately, I don't have a Linux nor a Raspberry Pi. I could install a Linux VM. Isn't there an easier way? Like, some tool where you put the individual pixels for each character. May 2, 2020 at 14:33
-
-
I have used this website to generate various fonts, sizes, etc. with success.
*Mono*
are monospaced, which means that all the characters are the same size.