Dont get glyphs during scanning phase

This commit is contained in:
jpirnay
2026-04-30 09:16:35 +02:00
parent 2df99a230f
commit 0366f8ece8
+5
View File
@@ -872,6 +872,11 @@ int GfxRenderer::getTextWidth(const int fontId, const char* text, const EpdFontF
return 0; return 0;
} }
if (fontCacheManager_ && fontCacheManager_->isScanning()) {
fontCacheManager_->recordText(text, fontId, style);
return 0;
}
int w = 0, h = 0; int w = 0, h = 0;
fontIt->second.getTextDimensions(text, &w, &h, style); fontIt->second.getTextDimensions(text, &w, &h, style);
return w; return w;