Register / Login | Desktop view |
void TfteSpiDrawable::fontPtrToNum(const void* font, int mag) {
if(font == nullptr) {
tft->setTextFont((uint8_t) mag);
}
else {
tft->setFreeFont(static_cast<const GFXfont *>(font));
}
}
void TfteSpiDrawable::fontPtrToNum(const void* font, int mag) {
#ifdef LOAD_GFXFF
if(font == nullptr) {
tft->setTextFont((uint8_t) mag); // <= does not work, for some reason GLCD data structure is not found
}
else {
tft->setFreeFont(static_cast<const GFXfont *>(font));
}
#else
tft->setTextFont((uint8_t) mag); // numbered font does not take font data, just a number
#endif
}
#define LOAD_FONT4
installCoolBlueTraditionalTheme(renderer, MenuFontDef(&FreeMono12pt7b, 1), MenuFontDef(&FreeMono12pt7b, 1), true);
#define GFXFF
installCoolBlueTraditionalTheme(renderer, MenuFontDef(nullptr, 4), MenuFontDef(nullptr, 4), true);