[gs-cvs] rev 9330 - trunk/gs/Resource/Init
ken at ghostscript.com
ken at ghostscript.com
Wed Jan 7 00:33:15 PST 2009
Author: ken
Date: 2009-01-07 00:33:14 -0800 (Wed, 07 Jan 2009)
New Revision: 9330
Modified:
trunk/gs/Resource/Init/pdf_font.ps
Log:
Fix (PDF Interpreter): Default Unicode decoding clashing with ToUnicode CMap
Details:
bug #690190 "Problem with -dProvideUnicode"
The ProvideUnicode switch creates a (read only) default Unicode decoding resource, presumably to use as a default ToUnicode Cmap when creating PDF files.
This interferes with PDF files which contain a real ToUnicode CMap, as the resource is read only and so cannot be updated with the content of the ToUnicode CMap.
Fixed by checking to see if the GlyphNamesToUnicode dictionary is writeable, and if it is not, creating a new one, when processing a ToUnicode CMap.
Expected Differences
None
Modified: trunk/gs/Resource/Init/pdf_font.ps
===================================================================
--- trunk/gs/Resource/Init/pdf_font.ps 2009-01-06 14:38:01 UTC (rev 9329)
+++ trunk/gs/Resource/Init/pdf_font.ps 2009-01-07 08:33:14 UTC (rev 9330)
@@ -527,6 +527,16 @@
setglobal
} if
dup /GlyphNames2Unicode .knownget not {
+ true % No existing G2U, make one
+ } {
+ dup wcheck {
+ false % Existing, writeable G2U, don't make new one
+ } {
+ pop true % Existing read only G2U, make new one
+ } ifelse
+ } ifelse
+
+ {
currentglobal exch dup gcheck setglobal
dup /GlyphNames2Unicode 100 dict dup 4 1 roll .forceput
3 2 roll setglobal
More information about the gs-cvs
mailing list