r14895 by jghali - #8943: incorrect pdf export when smallcaps effect is used on ß character

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 16 21:00:23 CET 2010


Revision: 14895
Author: jghali
Date: 2010-03-16T19:59:02.468354Z
Commit message: #8943: incorrect pdf export when smallcaps effect is used on ß character

Changeset: 
M  /branches/Version135/Scribus/scribus/scribusdoc.cpp

Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14894)
+++ scribus/scribusdoc.cpp	(revision 14895)
@@ -2954,7 +2954,7 @@
 void ScribusDoc::checkItemForFonts(PageItem *it, QMap<QString, QMap<uint, FPointArray> > & Really, uint lc)
 {
 	FPointArray gly;
-	QString chstr;
+	QChar chstr;
 	if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
 	{
 		for (int e = 0; e < it->itemText.length(); ++e)
@@ -2973,14 +2973,14 @@
 				{
 					if (it->itemText.paragraphStyle(e).tabValues()[t1].tabFillChar.isNull())
 						continue;
-					chstr = QString(it->itemText.paragraphStyle(e).tabValues()[t1].tabFillChar);
+					chstr = it->itemText.paragraphStyle(e).tabValues()[t1].tabFillChar;
 					if ((it->itemText.charStyle(e).effects() & ScStyle_SmallCaps) || (it->itemText.charStyle(e).effects() & ScStyle_AllCaps))
 					{
-						if (chstr.toUpper() != QString(it->itemText.paragraphStyle(e).tabValues()[t1].tabFillChar))
+						if (chstr.toUpper() != chstr)
 							chstr = chstr.toUpper();
 					}
-					chr = chstr[0].unicode();
-					uint gl = it->itemText.charStyle(e).font().char2CMap(chstr[0]);
+					chr = chstr.unicode();
+					uint gl = it->itemText.charStyle(e).font().char2CMap(chstr);
 					gly = it->itemText.charStyle(e).font().glyphOutline(gl);
 					if (!it->itemText.charStyle(e).font().replacementName().isEmpty())
 						Really[it->itemText.charStyle(e).font().replacementName()].insert(gl, gly);
@@ -2989,14 +2989,14 @@
 				{
 					if (it->itemText.defaultStyle().tabValues()[t1].tabFillChar.isNull())
 						continue;
-					chstr = QString(it->itemText.defaultStyle().tabValues()[t1].tabFillChar);
+					chstr = it->itemText.defaultStyle().tabValues()[t1].tabFillChar;
 					if ((it->itemText.charStyle(e).effects() & ScStyle_SmallCaps) || (it->itemText.charStyle(e).effects() & ScStyle_AllCaps))
 					{
-						if (chstr.toUpper() != QString(it->itemText.defaultStyle().tabValues()[t1].tabFillChar))
+						if (chstr.toUpper() != chstr)
 							chstr = chstr.toUpper();
 					}
-					chr = chstr[0].unicode();
-					uint gl = it->itemText.charStyle(e).font().char2CMap(chstr[0]);
+					chr = chstr.unicode();
+					uint gl = it->itemText.charStyle(e).font().char2CMap(chstr);
 					gly = it->itemText.charStyle(e).font().glyphOutline(gl);
 					if (!it->itemText.charStyle(e).font().replacementName().isEmpty())
 						Really[it->itemText.charStyle(e).font().replacementName()].insert(gl, gly);
@@ -3096,10 +3096,10 @@
 			}
 			if ((it->itemText.charStyle(e).effects() & ScStyle_SmallCaps) || (it->itemText.charStyle(e).effects() & ScStyle_AllCaps))
 			{
-				chstr = it->itemText.text(e, 1);
-				if (chstr.toUpper() != it->itemText.text(e, 1))
+				chstr = it->itemText.text(e);
+				if (chstr.toUpper() != chstr)
 					chstr = chstr.toUpper();
-				chr = chstr[0].unicode();
+				chr = chstr.unicode();
 			}
 			if (it->itemText.charStyle(e).font().canRender(chr))
 			{




More information about the scribus-commit mailing list