diff --git a/Extensions/Smooth_font.cpp b/Extensions/Smooth_font.cpp index 6e5f89d..07b8bef 100644 --- a/Extensions/Smooth_font.cpp +++ b/Extensions/Smooth_font.cpp @@ -77,12 +77,12 @@ void TFT_eSPI::loadFont(String fontName) unloadFont(); // Avoid a crash on the ESP32 if the file does not exist - if (SPIFFS.exists("/" + fontName + ".vlw") == false) { + if ((_pFS ? *_pFS : SPIFFS).exists("/" + fontName + ".vlw") == false) { Serial.println("Font file " + fontName + " not found!"); return; } - fontFile = SPIFFS.open( "/" + fontName + ".vlw", "r"); + fontFile = (_pFS ? *_pFS : SPIFFS).open( "/" + fontName + ".vlw", "r"); if(!fontFile) return; @@ -452,11 +452,10 @@ void TFT_eSPI::drawGlyph(uint16_t code) int16_t cy = cursor_y + gFont.maxAscent - gdY[gNum]; int16_t cx = cursor_x + gdX[gNum]; - startWrite(); // Avoid slow ESP32 transaction overhead for every pixel - for (int y = 0; y < gHeight[gNum]; y++) { fontFile.read(pbuffer, gWidth[gNum]); //