r21194 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 15 23:14:30 UTC 2016


Author: jghali
Date: Fri Apr 15 23:14:30 2016
New Revision: 21194

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21194
Log:
#13871: If paragraph contains DropCaps and Enter is pressed before Space --> content disappears

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21194&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Apr 15 23:14:30 2016
@@ -1781,6 +1781,13 @@
 					firstGlyph.scaleV = (realAsce / realCharHeight);
 					firstGlyph.scaleH *= firstGlyph.scaleV;
 					firstGlyph.xoffset -= 0.5; //drop caps are always to far from column left edge
+				}
+				// This is to mimic pre-boxes branches in case first character of paragraph is a space
+				// If we don't do this, paragraph offset will not apply correctly to first line
+				if ((firstGlyph.scaleH == 0.0) || (firstGlyph.scaleV == 0.0))
+				{
+					firstGlyph.scaleH = firstGlyph.scaleV = 1.0;
+					wide = 0.0;
 				}
 				firstGlyph.xadvance = wide / firstGlyph.scaleH;
 				desc = realDesc = 0;




More information about the scribus-commit mailing list