Sorry hopefully some one who has edited their own fonts will chime in and give some more help.
Also most of my stuff playing with this has been done using our own Teensy oriented drivers, like ILI9341_t3 or more with my own ILI9341_t3n
For these drivers we also have a different Font format defined, and there are some github projects up with lots of fonts like up at:
https://github.com/Paulstoffregen/ILI9341_fonts
You can copy them in to your project or you can put these into a proper library location and simply include the header file for the font... Warning however with this version of the font library it will include all of the fonts into your project which use up space. A few of us created version of that library:
https://github.com/mjs513/ILI9341_fonts
Which sets it up as arduino new library format, which allows us to create an archive file from it, which than will cause Arduino linker to only include those fonts which are used.
There are also places mentioned up on forum on tools and the like to create the fonts.
Adafruit GFX library also includes a set of fonts.
Now depending on which Graphic library you end up using, you need to then have your sketch include the include file for the font... My ILI9341_t3n library has examples, which include both types of fonts.
Example (ILI_Ada_FontTest4),
Like:
Code:
#include <ILI9341_t3n.h>
#include "font_Arial.h"
#include "font_ArialBold.h"
#include "font_ComicSansMS.h"
...
// maybe a few GFX FOnts?
#include <Fonts/FreeMono9pt7b.h>
#include <Fonts/FreeSerif9pt7b.h>
Now to use the fonts you would use the library method setFont.
Again my _t3n gives support for the both the Adafruit fonts by passing in pointer to font
Or to the ILI9341 font format by passing in reference to one of those fonts.
So again for Adafruit font, like the FreeSerif... You would do something like:
Code:
tft.setFont( &FreeMono9pt7b);
Note: I believe that Adafruit fonts are one font structure per file, note the same name as the include...
For ILI fonts, we pass in something like:
where the file font_Arial.h above actually defined Ariel font for several different sizes, so you need to look at header file to see which ones.
Once you set the font, you can simply do things like: tft.print("ABCD");
Which will output in the currently selected font