[gs-cvs] rev 7107 - trunk/gs/lib
ray at ghostscript.com
ray at ghostscript.com
Sun Oct 15 10:19:46 PDT 2006
Author: ray
Date: 2006-10-15 10:19:45 -0700 (Sun, 15 Oct 2006)
New Revision: 7107
Modified:
trunk/gs/lib/gs_typ42.ps
Log:
Fix for bug 688929 -- Genoa test 412-01.ps defines a couple of Type 42 fonts
without anything in the 'sfnts'. This hack switches it to a Type 3. This is
harmless for normal files since the check is quick and is only executed when
fonts are loaded.
EXPECTED DIFFERENCES:
421-01.ps
Modified: trunk/gs/lib/gs_typ42.ps
===================================================================
--- trunk/gs/lib/gs_typ42.ps 2006-10-13 01:14:58 UTC (rev 7106)
+++ trunk/gs/lib/gs_typ42.ps 2006-10-15 17:19:45 UTC (rev 7107)
@@ -44,4 +44,19 @@
} bind def
% Register the font type for definefont.
-buildfontdict 42 /.buildfont42 cvx put
+buildfontdict 42
+ { % check for bogus sfnts -- this happens in Genoa FTS 421-01.ps
+ dup /sfnts get 0 get length 14 lt { % smallest valid sfnts is 14 bytes
+ % HACK: Add a BuildGlyph and make this a Type 3 font instead
+ dup /FontType 3 put
+ dup /BuildGlyph {
+ 1 index /CharStrings get exch 2 copy known not { pop /.notdef } if get exec
+ } bind put
+ //.buildfont3 exec
+ } {
+ //.buildfont42 exec
+ } ifelse
+ } bind
+put
+
+
More information about the gs-cvs
mailing list