[gs-cvs] rev 7085 - trunk/gs/lib
alexcher at ghostscript.com
alexcher at ghostscript.com
Wed Oct 4 18:09:35 PDT 2006
Author: alexcher
Date: 2006-10-04 18:09:35 -0700 (Wed, 04 Oct 2006)
New Revision: 7085
Modified:
trunk/gs/lib/pdf_font.ps
Log:
Following Acrobat Reader 5, ignore everything outside of begincmap..endcmap
Bug 688812, customer 170.
DIFFERENCES:
None
Modified: trunk/gs/lib/pdf_font.ps
===================================================================
--- trunk/gs/lib/pdf_font.ps 2006-10-05 01:00:55 UTC (rev 7084)
+++ trunk/gs/lib/pdf_font.ps 2006-10-05 01:09:35 UTC (rev 7085)
@@ -311,8 +311,7 @@
currentdict /unique_name undef
currentdict /match_in_diff undef
-/ToUnicodeCMapReader 3 dict def
-//ToUnicodeCMapReader begin
+/ToUnicodeCMapReader 3 dict begin
/defineresource % <name> <dict> <cat-name> defineresource <dict>
{
pop
@@ -330,7 +329,7 @@
See the comment to revision 6201 in gs/doc/ps2pdf.htm#Problems .\n) pdfformaterror
/CMap1 % arbitrary, PDF defineresource tolerates non-unique names
} bind def % A work around incorrect ToUnicode CMap generated by GS before rev. 6201.
-end
+currentdict end readonly def
/string2number % <string> string2number <number>
{ 0 exch dup 0 exch 1 exch length 1 sub { % n () i
@@ -458,9 +457,16 @@
} {
PDFfile fileposition exch
false resolvestream
+
//ToUnicodeCMapReader begin
- cvx exec
- end
+ % Following Acrobat we ignore everything outside begincmap..endcmap.
+ dup 0 (begincmap) /SubFileDecode filter flushfile
+ /CIDInit /ProcSet findresource begin 12 dict begin
+ 0 (endcmap) /SubFileDecode filter cvx /begincmap cvx exch 2 .execn
+ endcmap
+ userdict /.lastToUnicode currentdict put
+ end end end
+
PDFfile exch setfileposition
1 index /FontInfo .knownget not {
1 index /FontInfo 5 dict dup 4 1 roll put
More information about the gs-cvs
mailing list