diff --git a/lib/Epub/Epub/ParsedText.cpp b/lib/Epub/Epub/ParsedText.cpp index 0bbc23b2..01f7aafc 100644 --- a/lib/Epub/Epub/ParsedText.cpp +++ b/lib/Epub/Epub/ParsedText.cpp @@ -68,8 +68,7 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo applyParagraphIndent(); const int pageWidth = viewportWidth; - const int spaceWidth = static_cast(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(wordSpacing) / 100.0 * renderer.getSpaceWidth(fontId)); auto wordWidths = calculateWordWidths(renderer, fontId); std::vector lineBreakIndices; if (hyphenationEnabled) {