View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017792 | Scribus | Text Frames / Story Editor | public | 2026-04-11 12:57 | 2026-08-24 16:03 |
| Reporter | ale | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 1.7.3.svn | ||||
| Summary | 0017792: Justified paragraph ending in a frame break gets forced justified | ||||
| Description | - Have a justified paragraph - Add a frame break at its end - Now the paragraph looks "forced justified" | ||||
| Tags | #please_test | ||||
| Patch | No | ||||
|
|
Here is what fixed it for me (with more details on the same). fix-justify-forced-on-linebreak-v1.0.patch (1,221 bytes)
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp (revision 27777)
+++ scribus/pageitem_textframe.cpp (working copy)
@@ -2572,11 +2572,20 @@
OFs = 0;
}
+ // A line ending in one of these breaks should only be
+ // force-justified if the break falls mid-paragraph -
+ // if it's also the paragraph's own last character,
+ // this line is the paragraph's last line, and should
+ // be left alone like any other last line of a
+ // justified paragraph (natural width, not stretched).
+ bool breakEndsParagraph = (a + 1 >= itemText.length()) || (itemText.text(a + 1) == SpecialChars::PARSEP);
+
if (style.alignment() == ParagraphStyle::Extended
|| (style.alignment() == ParagraphStyle::Justified
&& (itemText.text(a) == SpecialChars::LINEBREAK ||
itemText.text(a) == SpecialChars::FRAMEBREAK ||
itemText.text(a) == SpecialChars::COLBREAK)
+ && !breakEndsParagraph
&& (current.lineData.lastCluster - 1 >= 0)
&& !itemText.text(glyphClusters[current.lineData.lastCluster - 1].lastChar()).isSpace()))
{
justify-linebreak-diagnostic-TEMPORARY-v1.0.patch (1,564 bytes)
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp (revision 27777)
+++ scribus/pageitem_textframe.cpp (working copy)
@@ -2580,6 +2580,15 @@
&& (current.lineData.lastCluster - 1 >= 0)
&& !itemText.text(glyphClusters[current.lineData.lastCluster - 1].lastChar()).isSpace()))
{
+ if (itemText.text(a) == SpecialChars::LINEBREAK ||
+ itemText.text(a) == SpecialChars::FRAMEBREAK ||
+ itemText.text(a) == SpecialChars::COLBREAK)
+ {
+ bool nextIsParsepOrEnd = (a + 1 >= itemText.length()) || (itemText.text(a + 1) == SpecialChars::PARSEP);
+ qDebug() << "[JUSTIFYDIAG-1] forced justifyLine() at a=" << a
+ << "breakChar=" << itemText.text(a).unicode()
+ << "nextIsParsepOrEnd=" << nextIsParsepOrEnd;
+ }
current.justifyLine(style);
}
else
@@ -3005,6 +3014,15 @@
itemText.text(a) == SpecialChars::COLBREAK)
&& !itemText.text(a).isSpace()))
{
+ if (itemText.text(a) == SpecialChars::LINEBREAK ||
+ itemText.text(a) == SpecialChars::FRAMEBREAK ||
+ itemText.text(a) == SpecialChars::COLBREAK)
+ {
+ bool nextIsParsepOrEnd = (a + 1 >= itemText.length()) || (itemText.text(a + 1) == SpecialChars::PARSEP);
+ qDebug() << "[JUSTIFYDIAG-2] forced justifyLine() at a=" << a
+ << "breakChar=" << itemText.text(a).unicode()
+ << "nextIsParsepOrEnd=" << nextIsParsepOrEnd;
+ }
current.justifyLine(style);
}
else
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-04-11 12:57 | ale | New Issue | |
| 2026-08-24 16:02 | buttar | Note Added: 0054295 | |
| 2026-08-24 16:02 | buttar | File Added: justify-linebreak-diagnostic-report.pdf | |
| 2026-08-24 16:02 | buttar | File Added: fix-justify-forced-on-linebreak-report.pdf | |
| 2026-08-24 16:02 | buttar | File Added: fix-justify-forced-on-linebreak-v1.0.patch | |
| 2026-08-24 16:02 | buttar | File Added: justify-linebreak-diagnostic-TEMPORARY-v1.0.patch | |
| 2026-08-24 16:03 | buttar | Tag Attached: #please_test |