MerseyViking
New member
Just a quick announcement to say I have written a small tool to generate bitmap fonts that are compatible with Paul's (and Lady Ada's) ILI9341 rendering library, from TrueType fonts (and almost certainly any font supported by FreeType2).
They can be output as C code to compile straight into any project, or as a binary file that can be copied to an SD card or flash chip, and loaded dynamically at run time.
Go here: https://github.com/GeoSpark/ILI9341-font-packer for some Pythonic goodness and a more thorough README. The code is largely without comment, and would benefit from some refactoring and validation checking, but it works for me. Pull requests are welcome.
I know there are already some tools written by Paul to achieve something similar, but I wrote this for a couple of reasons. 1) the existing tool only works with BDF fonts and I wanted to use TTFs, and 2) I don't like Perl OK, that last one isn't a *good* reason, but it was a nice intellectual exercise in pulling apart the pretty clever font format, and rebuilding it using my language of choice.
I have also included a simplified uploader script and sketch based on those found in the SerialFlash library.
-JD
They can be output as C code to compile straight into any project, or as a binary file that can be copied to an SD card or flash chip, and loaded dynamically at run time.
Go here: https://github.com/GeoSpark/ILI9341-font-packer for some Pythonic goodness and a more thorough README. The code is largely without comment, and would benefit from some refactoring and validation checking, but it works for me. Pull requests are welcome.
I know there are already some tools written by Paul to achieve something similar, but I wrote this for a couple of reasons. 1) the existing tool only works with BDF fonts and I wanted to use TTFs, and 2) I don't like Perl OK, that last one isn't a *good* reason, but it was a nice intellectual exercise in pulling apart the pretty clever font format, and rebuilding it using my language of choice.
I have also included a simplified uploader script and sketch based on those found in the SerialFlash library.
-JD