when scanning, route through a metadata-only path

This commit is contained in:
jpirnay
2026-04-29 14:53:45 +02:00
parent dbf50c2a82
commit 12f16e9b28
+10
View File
@@ -1919,6 +1919,11 @@ int GfxRenderer::getTextAdvanceX(const int fontId, const char* text, EpdFontFami
return 0;
}
if (fontCacheManager_ && fontCacheManager_->isScanning()) {
fontCacheManager_->recordText(text, fontId, style);
return 0;
}
uint32_t cp;
uint32_t prevCp = 0;
int widthPx = 0;
@@ -1993,6 +1998,11 @@ void GfxRenderer::drawTextRotated90CW(const int fontId, const int x, const int y
return;
}
if (fontCacheManager_ && fontCacheManager_->isScanning()) {
fontCacheManager_->recordText(text, fontId, style);
return;
}
const auto& font = fontIt->second;
int lastBaseY = y;