r21402 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 6 21:59:33 UTC 2016


Author: jghali
Date: Wed Jul  6 21:59:33 2016
New Revision: 21402

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21402
Log:
#14206: Hyphens align incorrectly when using right alignment

Modified:
    branches/Version14x/Scribus/scribus/pageitem_textframe.cpp

Modified: branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21402&path=/branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ branches/Version14x/Scribus/scribus/pageitem_textframe.cpp	Wed Jul  6 21:59:33 2016
@@ -2247,8 +2247,17 @@
 						// Justification
 						if (opticalMargins & ParagraphStyle::OM_RightHangingPunct)
 							current.line.width += opticalRightMargin(itemText, current.line);
-						else
-							current.line.naturalWidth += hyphWidth;
+						// #12565: Right alignment of hyphens
+						// The additional character width has already been taken into account
+						// above via the line break position, so it's not necessary to increase
+						// the line natural width again:
+						// line 2064: breakPos = current.xPos;
+						// line 2065: if (hl->ch != '-')
+						// line 2066: {
+						// line 2067: 	breakPos += hyphWidth;
+						// line 2068: }
+						/*else
+							current.line.naturalWidth += hyphWidth;*/
 						
 						OFs = 0;
 						if (style.alignment() == ParagraphStyle::Rightaligned)




More information about the scribus-commit mailing list