[gs-cvs] rev 7663 - trunk/gs/lib

alexcher at ghostscript.com alexcher at ghostscript.com
Wed Jan 31 14:02:35 PST 2007


Author: alexcher
Date: 2007-01-31 14:02:34 -0800 (Wed, 31 Jan 2007)
New Revision: 7663

Modified:
   trunk/gs/lib/pdf_font.ps
Log:
When Tf refers to an unknown resource name, use the resource name as a font
name. This fully recovers the given sample file and avoids fatal PostScript
errors in other cases. Bug 689037.

DIFFERENCES:
None


Modified: trunk/gs/lib/pdf_font.ps
===================================================================
--- trunk/gs/lib/pdf_font.ps	2007-01-31 21:32:33 UTC (rev 7662)
+++ trunk/gs/lib/pdf_font.ps	2007-01-31 22:02:34 UTC (rev 7663)
@@ -1533,8 +1533,15 @@
     } ifelse
   } bdef
   /Tf {
-    1 index Page /Font rget not { 1 index /invalidfont signalerror } if
-    resourcefont exch Tf pop
+    1 index Page /Font rget {
+      resourcefont exch Tf pop
+    }
+    { % Bug 689037
+      (   **** Warning: Tf refers to an unknown resource name: ) pdfformaterror
+      1 index .namestring pdfformaterror
+      ( Assuming it's a font name.\n) pdfformaterror
+      Tf
+    } ifelse
   } bdef
 end
 



More information about the gs-cvs mailing list