From 8c1b6b270f7bd5a8d83e85e6d886292b54f7f430 Mon Sep 17 00:00:00 2001 From: GenevensiS <66968533+G-e-n-e-v-e-n-s-i-S@users.noreply.github.com> Date: Thu, 26 Sep 2024 03:23:46 +0200 Subject: [PATCH] take margin_right into account when determining width (#91) --- src/render/text/viewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/text/viewer.cpp b/src/render/text/viewer.cpp index cc1bba5c..cae26541 100644 --- a/src/render/text/viewer.cpp +++ b/src/render/text/viewer.cpp @@ -613,7 +613,7 @@ bool TextViewer::prepareLinesAtScale(RotatedDC& dc, const vector& char } // Did the word become too long? if (!break_now) { - double max_width = lineRight(dc, style, line.top); + double max_width = lineRight(dc, style, line.top) - line.margin_right; if (line_size.width + word_size.width > max_width) { if (!style.field().multi_line) { // single line word does not fit