r21313 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat May 14 16:19:13 UTC 2016


Author: jghali
Date: Sat May 14 16:19:13 2016
New Revision: 21313

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21313
Log:
fix excessive line spacing when using baseline grid spacing with some fonts

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21313&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Sat May 14 16:19:13 2016
@@ -2122,7 +2122,12 @@
 					//	diff = (currentObject->height() + currentObject->lineWidth()) * scaleV + offset - (current.yPos - lastLineY);
 						diff = (currentObjectBox.height() * scaleV + offset) - (current.yPos - lastLineY);
 					else
-						diff = font.capHeight(hlcsize10) * scaleV + offset - (current.yPos - lastLineY) - desc;
+					{
+					//	Pre-boxes code equivalent below:
+					//	int glyphID = font.char2CMap(QChar('l'));
+					//	diff = font.glyphBBox(glyphID, hlcsize10).ascent * scaleV + offset - (current.yPos - lastLineY);
+						diff = realAsce - (current.yPos - lastLineY);
+					}
 				}
 				else
 				{
@@ -2904,6 +2909,7 @@
 			}
 			else
 				maxYAsc = current.yPos - realAsce;
+			//fix for glyphs with negative realAsce value
 			maxYAsc = qMax(maxYAsc, 0.0);
 			maxYDesc = current.yPos + realDesc;
 




More information about the scribus-commit mailing list