- // Only Vera Mono 9 is used by default
- drawString((uint16_t)x, (uint16_t)y, (uint16_t)color, &dejaVuSans9ptFontInfo, (char *)&data);
+ #if CFG_TFTLCD_USEAAFONTS
+ uint16_t ctable[4];
+ // Calculate 4 color lookup table using the appropriate fore and bg colors
+ // This should really be optimized out into theme.h!
+ aafontsCalculateColorTable(bgcolor, (uint16_t)fontcolor, &ctable[0], 4);
+ switch (font)
+ {
+ default: // Only enough space for the default font for now
+ aafontsDrawString((uint16_t)x, (uint16_t)y, ctable, &THEME_FONT, (char *)&data);
+ break;
+ }
+ #else
+ switch (font)
+ {
+ default: // Only enough space for the default font for now
+ fontsDrawString((uint16_t)x, (uint16_t)y, (uint16_t)fontcolor, &THEME_FONT, (char *)&data);
+ break;
+ }
+ #endif