From 9a0f78acb58f0a51084664e30e64c893b8b80e31 Mon Sep 17 00:00:00 2001 From: Jonas Diemer Date: Thu, 18 Dec 2025 19:43:39 +0100 Subject: [PATCH] Fixed space calculation for Extra Paragraph Spacing OFF (indent 1st line) --- lib/Epub/Epub/ParsedText.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Epub/Epub/ParsedText.cpp b/lib/Epub/Epub/ParsedText.cpp index b666192..766d593 100644 --- a/lib/Epub/Epub/ParsedText.cpp +++ b/lib/Epub/Epub/ParsedText.cpp @@ -53,7 +53,7 @@ void ParsedText::layoutAndExtractLines(const GfxRenderer& renderer, const int fo ans[totalWordCount - 1] = totalWordCount - 1; for (int i = totalWordCount - 2; i >= 0; --i) { - int currlen = -spaceWidth + indentWidth; + int currlen = -spaceWidth + (i==0) ? indentWidth : 0; dp[i] = MAX_COST; for (size_t j = i; j < totalWordCount; ++j) {