[scribus] small patch to make Scribus 1.5 more like Scribus 1.4

William Bader williambader at hotmail.com
Fri Aug 29 02:27:04 UTC 2014

In the bug report http://bugs.scribus.net/view.php?id=12636 , I have a Scribus 1.4 sla that formats incorrectly in Scribus 1.5.
The details, screen capture, and patch are in the bug report.
The file A1-20140111.sla was made with Scribus 1.4 on a Mac. I compared the file on both Scribus 1.4.3 and 1.5.0svn on Linux. It is good in Scribus 1.4, but the "Associated Press Photos" line has too much space before it in Scribus 1.5. The extra space pushes the story headline into the story body.    
It looks like the difference is how Scribus 1.5 treats blank lines. In the story editor, the first two lines are 48pt, while the blank third line is 18pt. Scribus 1.4 handles that correctly, but Scribus 1.5 seems to reserve 48pt for the 18pt third line if the line is empty but 18pt if the line has text.
In Scribus 1.5, PageItem_TextFrame::layout() in scribus/pageitem_textframe.cpp around line 2013, when it finds the empty line with only a paragraph mark, it increments current.yPos by style.lineSpacing(). This ends up as 41, which seems to come from the 48pt text on the previous line. I think that it should increment current.yPos by only font.ascent(style.charStyle().fontSize() / 10.0), which reflects the style of the paragraph separator.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20140828/f1c68d7c/attachment.html>

More information about the scribus mailing list