View Issue Details

IDProjectCategoryView StatusLast Update
0012636ScribusGeneralpublic2014-10-29 20:31
Reporterwilliam Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinux x86_64OSFedoraOS Version20
Summary0012636: [patch] Make Scribus 1.5 formatting more like Scribus 1.4
DescriptionWhen Scribus lay out a blank line (a line with only a PARSEP), it sometimes allocates space based on the font size of the last character of the previous line instead of font size of the paragraph marker.
Steps To ReproduceOpen the attached document and look at the space above the "Associated Press Photos" line.
TagsNo tags attached.
PatchYes

Activities

william

2014-08-28 03:49

updater  

william

2014-08-28 03:51

updater  

A1-20140111.sla (214,606 bytes)

william

2014-08-28 03:51

updater  

scribus143-28aug14.png (505,524 bytes)   
scribus143-28aug14.png (505,524 bytes)   

william

2014-08-28 03:51

updater  

scribus15-before-28aug14.png (516,938 bytes)   
scribus15-before-28aug14.png (516,938 bytes)   

william

2014-08-28 03:52

updater  

scribus15-after-28aug14.png (552,139 bytes)   
scribus15-after-28aug14.png (552,139 bytes)   

william

2014-08-28 03:55

updater   ~0033356

? scribus15-formatfix-28aug14.pat = patches
? A1-20140111.sla = Scribus 1.4 SLA
? scribus143-28aug14.png = screen capture of correct layout in Scribus 1.4.3
? scribus15-before-28aug14.png = screen capture of incorrect layout in Scribus 1.5.0svn before the patch
? scribus15-after-28aug14.png = screen capture of layout in Scribus 1.5.0svn after the patch

william

2014-08-29 02:23

updater   ~0033358

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.

Frame and text sizes in points in the story
93.09 (1.4 needs 89.50, 1.5 needs 76.50)
 Headline WC 18: 48pt A coach
 Headline WC 18: 48pt of enthusiasm
49.19 (1.4 needs 36.50 points in this frame to make the text fit, while 1.5 needs 75.90 points, 75.90 - 36.50 = 39.40)
 Headline WC 18: 18pt (The empty line that causes the problem.)
 Photo Credit: 7pt Associated Press
 Photo Caption: 10pt Jordan Steffy (2 lines)
 Photo Caption: 10pt
73.00
 Headline WC 18: 27.10pt Former players
 Headline WC 18: 27.10pt PSU expected
 No Style: 12
222.39
 Byline part 1: 9pt BY MIKE
 Byline part 2: 8pt Sports Columnist
 Byline part 3: 8pt mgross@
 Body: 9.5pt Jordan Steffy
 Body: 9.5pt If Penn

Headline WC 18
 Automatic Linespacing, 15.00pt
 0 pt above paragraph, 0 pt below paragraph
 18pt text, 2% tracking

Photo Credit
 Fixed Linespacing, 11.00pt
 7pt text, -4% tracking

Photo Caption
 Fixed Linespacing 11pt
 10pt text, -2% tracking

jghali

2014-08-30 23:59

administrator   ~0033380

Last edited: 2014-08-31 11:56

An analysis of the sla shows that the emtpy lines which trigger the observed behavior have a fixed linespacing of 41pts which override the style linespacing. Given that fact, the 1.5.0svn rendering seems correct, and it seems the issue is in 1.4.x.

>> when it finds the empty line with only a paragraph mark, it increments current.yPos by style.lineSpacing().

This is correct behavior. A line spacing based on the font size exclusively is incorrect.

william

2014-08-31 20:24

updater  

scribus15-line-31aug14.gif (84,099 bytes)   
scribus15-line-31aug14.gif (84,099 bytes)   

william

2014-08-31 20:47

updater   ~0033419

Thanks for looking at the file.

When I compared the Scribus 1.4 and 1.5 code, I noticed that Scribus 1.5 has some additional tests for line spacing, and those tests might be the fixes for issues in Scribus 1.4 that you mentioned.

Can you tell me where the fixed line spacing of 41 comes from? The style sets "Automatic Linespacing". The first two lines of text have a 48 point font, and the third (empty) line has an 18 point font.

Also, if I place a lower case "x" on the third line, the line takes up less space with an "x" than when it is empty.

I do not need this particular page to work, but before the new PDF printing options were back-ported from 1.5 to 1.4, a few people posted to the list that they had 1.4 documents that did not open correctly in 1.5. This might be a simple example of the problem. I would like to understand how the 41 is calculated and why adding a character to a blank line makes the line take up less space instead of more space. An explanation of the rules to calculate line spacing might also help people trying to move from 1.4 to 1.5.

william

2014-08-31 20:48

updater  

scribus-wc18style-31aug14.png (103,514 bytes)   
scribus-wc18style-31aug14.png (103,514 bytes)   

william

2014-08-31 20:48

updater  

jghali

2014-08-31 20:57

administrator   ~0033420

>> Can you tell me where the fixed line spacing of 41 comes from?

Directly from the document :
<para PARENT="Headline WC 18" ALIGN="1" LINESPMode="0" LINESP="41"/>

william

2014-09-01 00:22

updater  

scribus14-linespacing-1sep14.gif (215,324 bytes)   
scribus14-linespacing-1sep14.gif (215,324 bytes)   

william

2014-09-01 00:32

updater   ~0033422

Thanks!
I see those lines in the SLA. I should have looked there first.
I found where to set the line spacing in the GUI.
I attached a screen capture scribus14-linespacing-1sep14.gif from Fedora 20's Scribus 1.4.3. When I click on the blank line inside the frame, the Text section of the Properties window shows the 41pt line spacing, but the space is less than 18pt, so this looks like a problem in Scribus 1.4 that was fixed in 1.5.

jghali

2014-10-29 19:43

administrator   ~0034170

Closing as this is an issue in 14x that we won't reintroduce in 1.5.x.

Issue History

Date Modified Username Field Change
2014-08-28 03:49 william New Issue
2014-08-28 03:49 william File Added: scribus15-formatfix-28aug14.pat
2014-08-28 03:51 william File Added: A1-20140111.sla
2014-08-28 03:51 william File Added: scribus143-28aug14.png
2014-08-28 03:51 william File Added: scribus15-before-28aug14.png
2014-08-28 03:52 william File Added: scribus15-after-28aug14.png
2014-08-28 03:55 william Note Added: 0033356
2014-08-29 02:23 william Note Added: 0033358
2014-08-29 06:14 jghali Project Contributor Builds => Scribus
2014-08-30 23:59 jghali Note Added: 0033380
2014-08-31 11:56 jghali Note Edited: 0033380
2014-08-31 20:24 william File Added: scribus15-line-31aug14.gif
2014-08-31 20:47 william Note Added: 0033419
2014-08-31 20:48 william File Added: scribus-wc18style-31aug14.png
2014-08-31 20:48 william File Added: scribus15-with-and-without-x-31aug14.gif
2014-08-31 20:57 jghali Note Added: 0033420
2014-09-01 00:22 william File Added: scribus14-linespacing-1sep14.gif
2014-09-01 00:32 william Note Added: 0033422
2014-10-24 22:57 Kunda Patch => Yes
2014-10-29 01:37 Kunda Sticky Issue No => Yes
2014-10-29 19:43 jghali Note Added: 0034170
2014-10-29 19:43 jghali Status new => resolved
2014-10-29 19:43 jghali Resolution open => no change required
2014-10-29 19:43 jghali Assigned To => jghali
2014-10-29 19:43 jghali Status resolved => closed
2014-10-29 20:31 jghali Sticky Issue Yes => No