Fix sd card font performance for txt + md

This commit is contained in:
jpirnay
2026-05-14 21:49:01 +02:00
parent 49fa04d473
commit 6b37fcd97e
2 changed files with 8 additions and 0 deletions
@@ -45,6 +45,8 @@ size_t parseAndWrapLines(const uint8_t* buffer, size_t chunkSize, size_t fileOff
std::string line(reinterpret_cast<const char*>(buffer + pos), displayLen);
size_t lineBytePos = 0;
renderer.ensureSdCardFontReady(fontId, line.c_str());
while (!line.empty() && static_cast<int>(outLines.size()) < linesPerPage) {
if (renderer.getTextWidth(fontId, line.c_str()) <= vw) {
outLines.push_back(line);