Round correctly and remove debug print.

This commit is contained in:
Jonas Diemer 2026-02-01 13:49:52 +01:00
parent 1a7fed2a69
commit 2f57565b9d

View File

@ -68,8 +68,7 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo
applyParagraphIndent();
const int pageWidth = viewportWidth;
const int spaceWidth = static_cast<float>(wordSpacing) / 100.0 * renderer.getSpaceWidth(fontId);
Serial.printf("[%lu] [PaT] wordSpacing: %d spaceWidth: %d\n", millis(), wordSpacing, spaceWidth);
const int spaceWidth = std::round(static_cast<float>(wordSpacing) / 100.0 * renderer.getSpaceWidth(fontId));
auto wordWidths = calculateWordWidths(renderer, fontId);
std::vector<size_t> lineBreakIndices;
if (hyphenationEnabled) {