r21135 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 29 19:36:38 UTC 2016


Author: jghali
Date: Tue Mar 29 19:36:38 2016
New Revision: 21135

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21135
Log:
#13861: Buggy justified alignment when using glyph scaling

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21135&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Tue Mar 29 19:36:38 2016
@@ -986,22 +986,15 @@
 	if (curr.glyphRuns[startItem].hasFlag(ScLayout_DropCap))
 		startItem++;
 	// distribute whitespace on spaces and glyphs
-
 	for (int i = startItem; i <= curr.line.lastRun; ++i)
 	{
 		GlyphRun& glyphrun = curr.glyphRuns[i];
-		if (i != curr.line.firstRun && glyphrun.hasFlag(ScLayout_ImplicitSpace))
-		{
-			GlyphRun& lastRun = curr.glyphRuns[i-1];
-			lastRun.glyphs().last().xadvance += imSpace;
-		}
 		double wide = glyphrun.width();
 		if (!glyphrun.hasFlag(ScLayout_ExpandingSpace))
 		{
 			for (int j = 0; j < glyphrun.glyphs().count(); ++j)
 			{
 				GlyphLayout& glyph = glyphrun.glyphs()[j];
-				glyph.xadvance += wide * glyphExtension;
 				glyph.xoffset *= glyphScale;
 				glyph.scaleH *= glyphScale;
 			}
@@ -1010,7 +1003,11 @@
 		{
 			GlyphLayout& glyph = glyphrun.glyphs().last();
 			glyph.xadvance += wide * spaceExtension;
-
+		}
+		if (i != curr.line.firstRun && glyphrun.hasFlag(ScLayout_ImplicitSpace))
+		{
+			GlyphRun& lastRun = curr.glyphRuns[i - 1];
+			lastRun.glyphs().last().xadvance += imSpace;
 		}
 	}
 }




More information about the scribus-commit mailing list