r16337 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:29:17 CET 2011


Author: jghali
Date: Thu Feb  3 07:29:17 2011
New Revision: 16337

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

Modified:
    branches/Version135/Scribus/scribus/pdflib_core.cpp

Modified: branches/Version135/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16337&path=/branches/Version135/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version135/Scribus/scribus/pdflib_core.cpp (original)
+++ branches/Version135/Scribus/scribus/pdflib_core.cpp Thu Feb  3 07:29:17 2011
@@ -1046,10 +1046,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;
@@ -1064,7 +1065,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)
@@ -4577,7 +4578,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;
 				tmp += UsedFontsP[style.font().replacementName()]+"S"+QString::number(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";




More information about the scribus-commit mailing list