In TFT_eSPI, to get nice smooth anti-aliased fonts, you can create a .VLW font in Processing, upload it to SPIFFS/LittleFS flash, and then load it like:
tft.loadFont("/Calibri_24.vlw", LittleFS);
Unfortunately this does not work in LovyanGFX: "no matching function for call to 'lgfx::v1::LGFX_Sprite::loadFont(const char [9], fs::LittleFSFS&)'".
None of the other methods word, either, like:
File f = LittleFS.open("/Calibri_24.vlw", "r");
if (!f) {
Serial.println("Font file open failed!");
} else {
tft.loadFont(f); // <-- works
}
Or even just
tft.loadFont("/Calibri_24.vlw");
The only thing that DOES work is converting it to a .h array using this site:
https://notisrac.github.io/FileToCArray/
And then we can load it with
img.loadFont(Calibri_48);
However these .h array files are 4x the size! To get a nice 100pt font on a display this way is ~400KB for a .vlw file, or 2MB for a .h array. These are too big to use, hence the need for full .vlw support like in TFT_eSPI.
Thank you for your wonderful library and your dedication and time!
In TFT_eSPI, to get nice smooth anti-aliased fonts, you can create a .VLW font in Processing, upload it to SPIFFS/LittleFS flash, and then load it like:
Unfortunately this does not work in LovyanGFX: "no matching function for call to 'lgfx::v1::LGFX_Sprite::loadFont(const char [9], fs::LittleFSFS&)'".
None of the other methods word, either, like:
Or even just
The only thing that DOES work is converting it to a .h array using this site:
https://notisrac.github.io/FileToCArray/
And then we can load it with
However these .h array files are 4x the size! To get a nice 100pt font on a display this way is ~400KB for a .vlw file, or 2MB for a .h array. These are too big to use, hence the need for full .vlw support like in TFT_eSPI.
Thank you for your wonderful library and your dedication and time!