A tutorial for using custom fonts with Adafruit GFX libraries

Status
Not open for further replies.
If you have ever wanted to use custom fonts with Adafruit GFX libraries, but can't figure out how to implement them, check out this video. It shows how to use them, sources for free fonts on-line, and how to create your own.

https://www.youtube.com/watch?v=L8MmTISmwZ8

Enjoy.

I find video-torials hard to follow - is this available as text, too ? For easy cut&paste and reading ?
BTW, just for the case someone does not know it: The faster ILI9341_T3 library supports custom (converted true-type, several hundret available) fonts too.
 
Last edited:
Frank B,

I started with that library but could not get the bdf_to_ili9341 utility to work. I was able to create an exe but never got to a point where the utility would create the corresponding h or c files. I tried entering a font in the statement: char font_name[1024] = "myFont"; to no avail.

Any help greatly appreciated.
 
Frank B,

I started with that library but could not get the bdf_to_ili9341 utility to work. I was able to create an exe but never got to a point where the utility would create the corresponding h or c files. I tried entering a font in the statement: char font_name[1024] = "myFont"; to no avail.

Any help greatly appreciated.


It's a commadline-utility. Open CMD, and enter
Code:
bdf_to_ili9341 <font.bdf >font.c
But you need an utility to convert ttf to bdf first. I used linux to convert all the google-fonts (oh, I should update my repo..)
I don't know if there is a windows-commandline-tool to convert ttf to bdf. For linux, you can use otf2bdf or you can use the *.pl script to generate the different sizes automatically.
I wrote a script to iterate though all the >600 google-font subdirectories - somehow I managed to delete it. Ok, should'nt be too complicated to write a new one..
If I remember correctly, it was quite fast and converted all the fonts in a few minutes. It's long ago..
 
Last edited:
I swapped my library for my 3.5" display (that uses an HX8357D chip), the ILI9341 can drive it though my changing the screen size. I'm using the Arial fonts that came with the library.

This library is blazing fast--I'll start using it from now on.

PS i messed with the custom font creator a bit more--still no luck. I found some free bdf fonts online and still could not get it to work--I'll keep trying maybe some day I'll get it working.
 
Status
Not open for further replies.
Back
Top