[gs-cvs] rev 7686 - in trunk/gs: doc src

alexcher at ghostscript.com alexcher at ghostscript.com
Wed Feb 7 13:42:46 PST 2007


Author: alexcher
Date: 2007-02-07 13:42:46 -0800 (Wed, 07 Feb 2007)
New Revision: 7686

Modified:
   trunk/gs/doc/pscet_status.txt
   trunk/gs/src/zbfont.c
Log:
Check the content of the /Encoding array when the font is created
to detect invalid fonts early and match CET test 16-04-01.

DIFFERENCES:
None


Modified: trunk/gs/doc/pscet_status.txt
===================================================================
--- trunk/gs/doc/pscet_status.txt	2007-02-07 17:19:23 UTC (rev 7685)
+++ trunk/gs/doc/pscet_status.txt	2007-02-07 21:42:46 UTC (rev 7686)
@@ -3419,10 +3419,7 @@
 
 16-03-4  OK	Now appears correct - Raph
 
-16-04-1  DIFF	In (/FONTTYPE1 /FONTTYPE1 1 BuildFont) test, Adobe typechecks, we are blank.
-	        In (/FONTTYPE0 /FONTTYPE3 3 BuildFont) test, Adobe typechecks, we /rangecheck
-		--getinterval--, Adobe /typecheck definefont. 
-	        Analyzed by Raph. assign Alex.
+16-04-1  OK  	Fixed by rev. 7686 - Alex
 
 16-05-1  OK	Color corrected by rev 7172
 

Modified: trunk/gs/src/zbfont.c
===================================================================
--- trunk/gs/src/zbfont.c	2007-02-07 17:19:23 UTC (rev 7685)
+++ trunk/gs/src/zbfont.c	2007-02-07 21:42:46 UTC (rev 7686)
@@ -636,6 +636,16 @@
 	if (!r_is_array(pencoding))
 	    return_error(e_invalidfont);
     }
+    if (pencoding) {   /* observed Adobe behavior */
+        int count = r_size(pencoding);
+        int type = ftype ? t_name : t_integer;
+        while (count--) {
+           ref r;
+           if (array_get(imemory, pencoding, count, &r) < 0 || 
+             !(r_has_type(&r, type) || r_has_type(&r, t_null))) 
+               return_error(e_typecheck);
+        }
+    }
     if ((code = dict_int_param(op, "WMode", 0, 1, 0, &wmode)) < 0 ||
 	(code = dict_bool_param(op, "BitmapWidths", false, &bitmapwidths)) < 0 ||
 	(code = dict_int_param(op, "ExactSize", 0, 2, fbit_use_bitmaps, &exactsize)) < 0 ||



More information about the gs-cvs mailing list