Clear cache on prewarm

This commit is contained in:
jpirnay
2026-05-04 15:33:47 +02:00
parent 2a30882c91
commit 48aaf821a5
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
class FontDecompressor {
public:
static constexpr uint16_t MAX_PAGE_GLYPHS = 512;
static constexpr uint8_t MAX_PAGE_SLOTS = 4; // One per font style (R/B/I/BI)
static constexpr uint8_t MAX_PAGE_SLOTS = 8; // Provide enough slots for heavily stylized HTML pages
FontDecompressor() = default;
~FontDecompressor();
+2
View File
@@ -24,6 +24,8 @@ void FontCacheManager::clearCache() {
}
void FontCacheManager::prewarmCache(int fontId, const char* utf8Text, uint8_t styleMask) {
clearCache();
// SD card font prewarm path: prewarm all requested styles in one call
auto sdIt = sdCardFonts_.find(fontId);
if (sdIt != sdCardFonts_.end()) {