Nitpick comments

This commit is contained in:
jpirnay
2026-05-14 21:56:32 +02:00
parent 6b37fcd97e
commit d031554450
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -616,7 +616,7 @@ bool MdReaderActivity::loadPageAtOffset(size_t offset, bool startInCodeBlock, st
if (renderer.isSdCardFont(cachedFontId)) {
std::string flatText;
for (const auto& span : flatLine.spans) flatText += span.text;
renderer.ensureSdCardFontReady(cachedFontId, flatText.c_str());
if (!flatText.empty()) renderer.ensureSdCardFontReady(cachedFontId, flatText.c_str());
}
size_t linesBefore = outLines.size();
+3 -1
View File
@@ -45,7 +45,9 @@ 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());
if (renderer.isSdCardFont(fontId) && !line.empty()) {
renderer.ensureSdCardFontReady(fontId, line.c_str());
}
while (!line.empty() && static_cast<int>(outLines.size()) < linesPerPage) {
if (renderer.getTextWidth(fontId, line.c_str()) <= vw) {