r16336 by jghali - #9726: chinese word is auto-replaced by another word in generated PDF

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 3 08:24:22 CET 2011


Author: jghali
Date: Thu Feb  3 07:24:22 2011
New Revision: 16336

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16336
Log:
#9726: chinese word is auto-replaced by another word in generated PDF

Modified:
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16336&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Thu Feb  3 07:24:22 2011
@@ -1078,10 +1078,11 @@
 	a = 0;
 	for (it = ReallyUsed.begin(); it != ReallyUsed.end(); ++it)
 	{
-		ScFace::FontFormat fformat = AllFonts[it.key()].format();
-		if ((!AllFonts[it.key()].hasNames()) || (Options.SubsetList.contains(it.key())))
-		{
-			if (AllFonts[it.key()].hasNames())
+		ScFace& face(AllFonts[it.key()]);
+		ScFace::FontFormat fformat = face.format();
+		if ((!face.hasNames()) || (Options.SubsetList.contains(it.key())))
+		{
+			if (face.hasNames())
 			{
 				UsedFontsP.insert(it.key(), "/Fo"+QString::number(a));
 				uint SubFonts = 0;
@@ -1096,7 +1097,7 @@
 				QString fon("");
 				QMap<uint, uint> glyphMapping;
 				QMap<uint,std::pair<QChar,QString> > gl;
-				AllFonts[it.key()].glyphNames(gl);
+				face.glyphNames(gl);
 				QMap<uint,FPointArray>& RealGlyphs(it.value());
 				QMap<uint,FPointArray>::Iterator ig;
 				for (ig = RealGlyphs.begin(); ig != RealGlyphs.end(); ++ig)
@@ -5367,7 +5368,7 @@
 				uint idx = hl->glyph.glyph;
 				uint idx1;
 				if (Options.SubsetList.contains(style.font().replacementName()))
-					idx1 = Type3Fonts[UsedFontsP[style.font().replacementName()]][idx] / 255;
+					idx1 = Type3Fonts[UsedFontsP[style.font().replacementName()]][idx] / 256;
 				else
 					idx1 = idx / 224;
 				ScFace currentFace = style.font();




More information about the scribus-commit mailing list