Author: jghali
Date: Sun Aug 12 00:05:12 2018
New Revision: 22623

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22623
Log:
#15397, part 2: fix potential incorrect generation of PostScript when some 
fonts are substituted

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

Modified: branches/Version14x/Scribus/scribus/pslib.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22623&path=/branches/Version14x/Scribus/scribus/pslib.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pslib.cpp       (original)
+++ branches/Version14x/Scribus/scribus/pslib.cpp       Sun Aug 12 00:05:12 2018
@@ -190,7 +190,7 @@
                                FontDesc += "cl\n} bind def\n";
                        }
                        FontDesc += "end\n";
-                       FontSubsetMap.insert(face.scName(), encodedName);
+                       FontSubsetMap.insert(face.replacementName(), 
encodedName);
                }
                else
                {
@@ -210,7 +210,7 @@
                        GlyphsOfFont.insert(it.key(), gl);
                        a++;
                }
-               psNameMap.insert(encodedName, face.scName());
+               psNameMap.insert(encodedName, face.replacementName());
        }
        Prolog = "%%BeginProlog\n";
        Prolog += "/Scribusdict 100 dict def\n";
@@ -2839,7 +2839,7 @@
                                        continue;
                                }
                                /* Subset all TTF Fonts until the bug in the 
TTF-Embedding Code is fixed */
-                               if 
(FontSubsetMap.contains(style.font().scName()))
+                               if 
(FontSubsetMap.contains(style.font().replacementName()))
                                {
 //                                     uint chr = chstr.unicode();
                                        uint chr = 
style.font().char2CMap(chstr);
@@ -2931,11 +2931,11 @@
                                                                        
PS_save();
                                                                        
PS_translate(style.fontSize() * style.shadowXOffset() / 10000.0, 
style.fontSize() * style.shadowYOffset() / 10000.0);
                                                                        
putColorNoDraw(style.strokeColor(), style.strokeShade());
-                                                                       
PS_showSub(chr, FontSubsetMap[style.font().scName()], tsz / 10.0, false);
+                                                                       
PS_showSub(chr, FontSubsetMap[style.font().replacementName()], tsz / 10.0, 
false);
                                                                        
PS_restore();
                                                                }
                                                                
putColorNoDraw(style.fillColor(), style.fillShade());
-                                                               PS_showSub(chr, 
FontSubsetMap[style.font().scName()], tsz / 10.0, false);
+                                                               PS_showSub(chr, 
FontSubsetMap[style.font().replacementName()], tsz / 10.0, false);
                                                                if 
((style.effects() & ScStyle_Outline))
                                                                {
                                                                        if 
((style.strokeColor() != CommonStrings::None) && ((tsz * style.outlineWidth() / 
10000.0) != 0))
@@ -2943,7 +2943,7 @@
                                                                                
PS_save();
                                                                                
PS_setlinewidth(tsz * style.outlineWidth() / 10000.0);
                                                                                
putColorNoDraw(style.strokeColor(), style.strokeShade());
-                                                                               
PS_showSub(chr, FontSubsetMap[style.font().scName()], tsz / 10.0, true);
+                                                                               
PS_showSub(chr, FontSubsetMap[style.font().replacementName()], tsz / 10.0, 
true);
                                                                                
PS_restore();
                                                                        }
                                                                }
@@ -3846,7 +3846,7 @@
                        putColor(cstyle.fillColor(), cstyle.fillShade(), false);
                }
                /* Subset all TTF Fonts until the bug in the TTF-Embedding Code 
is fixed */
-               if (FontSubsetMap.contains(cstyle.font().scName()))
+               if (FontSubsetMap.contains(cstyle.font().replacementName()))
                {
                        if (glyph != 0 && glyph != 
cstyle.font().char2CMap(QChar(' ')) && (!SpecialChars::isBreak(chstr)))
                        {
@@ -3871,7 +3871,7 @@
                                if (cstyle.fillColor() != CommonStrings::None)
                                {
                                        putColorNoDraw(cstyle.fillColor(), 
cstyle.fillShade());
-                                       PS_showSub(glyph, 
FontSubsetMap[cstyle.font().scName()], tsz / 10.0, false);
+                                       PS_showSub(glyph, 
FontSubsetMap[cstyle.font().replacementName()], tsz / 10.0, false);
                                }
                                PS_restore();
                        }


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to