Skip to content

.vlw fonts not supported like in TFT_eSPI? #767

Description

@yucandu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststaleInactive issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions