[gs-cvs] rev 8258 - trunk/gs/lib
alexcher at ghostscript.com
alexcher at ghostscript.com
Fri Sep 28 22:53:35 PDT 2007
Author: alexcher
Date: 2007-09-28 22:53:34 -0700 (Fri, 28 Sep 2007)
New Revision: 8258
Modified:
trunk/gs/lib/pdf_font.ps
Log:
Following the PDF spec, don't use .notdef glyph in Type 3 font.
.notdef may not be present at all. Bug 689475
DIFFERENCES:
None.
Modified: trunk/gs/lib/pdf_font.ps
===================================================================
--- trunk/gs/lib/pdf_font.ps 2007-09-27 23:06:07 UTC (rev 8257)
+++ trunk/gs/lib/pdf_font.ps 2007-09-29 05:53:34 UTC (rev 8258)
@@ -796,20 +796,22 @@
% Stack: font charcode
1 index begin 3 dict begin
/Font 3 -1 roll def /CharCode 1 index def
- % Make unknown characters map to /.notdef
- Encoding exch get dup CharProcs exch known
- { CharProcs exch oget }
- { pop CharProcs /.notdef oget }
- ifelse
- PDFfile fileposition exch
- false resolvestream
+ Encoding exch get CharProcs exch knownoget {
+ PDFfile fileposition exch
+ //false resolvestream
% Stack: filepos stream
% Don't let setgcolor set the color inside the BuildGlyph
% procedure, because this causes an /undefined error.
- q null /FillColor gput null /StrokeColor gput
- Font /Resources get exch pdfopdict .pdfruncontext
- Q
- PDFfile exch setfileposition
+ q //null /FillColor gput //null /StrokeColor gput
+ Font /Resources get exch pdfopdict .pdfruncontext
+ Q
+ PDFfile exch setfileposition
+ } {
+ % PDF Type 3 fonts don't use .notdef
+ % d1 implementation adjusts the width as needed
+ 0 0 0 0 0 0
+ pdfopdict /d1 get exec
+ } ifelse
end end
} bdef
dup currentdict Encoding .processToUnicode
More information about the gs-cvs
mailing list