KurtE
Senior Member+
The problem we run into with the fonts is, they #include header files.
That is for example you use the fonts Ariel_bold, its header file starts off like:
So it includes the ili9341_t3 library, and you end up with lots of duplicates...
I could maybe should fix this case by including these font files as well, and Actually I do, but I renamed them, as having them in two different libraries with same name, sometimes it got the right one and other times not... But for other font's, like the ones you can get from Paul's github: https://github.com/PaulStoffregen/ILI9341_fonts
They are problematic, They start off with the same hard coded include: #include "ILI9341_t3.h"
At one point I suggested that maybe we could split off the font definition out of the main include file:
Into it's own header file, that maybe again each ili93... like display driver would include, and/or maybe the font files don't reference a structure, but simply a set of bytes, and the internals to the display drivers could then cast...
That is for example you use the fonts Ariel_bold, its header file starts off like:
Code:
#ifndef _ILI9341_t3_font_ArialBold_
#define _ILI9341_t3_font_ArialBold_
#include "ILI9341_t3.h"
I could maybe should fix this case by including these font files as well, and Actually I do, but I renamed them, as having them in two different libraries with same name, sometimes it got the right one and other times not... But for other font's, like the ones you can get from Paul's github: https://github.com/PaulStoffregen/ILI9341_fonts
They are problematic, They start off with the same hard coded include: #include "ILI9341_t3.h"
At one point I suggested that maybe we could split off the font definition out of the main include file:
Code:
typedef struct {
const unsigned char *index;
const unsigned char *unicode;
const unsigned char *data;
unsigned char version;
unsigned char reserved;
unsigned char index1_first;
unsigned char index1_last;
unsigned char index2_first;
unsigned char index2_last;
unsigned char bits_index;
unsigned char bits_width;
unsigned char bits_height;
unsigned char bits_xoffset;
unsigned char bits_yoffset;
unsigned char bits_delta;
unsigned char line_space;
unsigned char cap_height;
} ILI9341_t3_font_t;