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

alexcher at ghostscript.com alexcher at ghostscript.com
Fri Jul 11 18:43:13 PDT 2008


Author: alexcher
Date: 2008-07-11 18:43:13 -0700 (Fri, 11 Jul 2008)
New Revision: 8837

Modified:
   trunk/gs/lib/gs_ttf.ps
Log:
Use /.notdef instead of null in the array of PostScript names of TTF glyphs.
This saves the trouble of checking for null values and fixes a case where
a null entry slipped through. Bug 689962, customer 384.

DIFFERENCES:
None


Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps	2008-07-12 01:17:24 UTC (rev 8836)
+++ trunk/gs/lib/gs_ttf.ps	2008-07-12 01:43:13 UTC (rev 8837)
@@ -606,7 +606,11 @@
       /postpos glyphnames def
       /total_length postglyphs //string_array_size exec def
       numglyphs array 0 1 numglyphs 1 sub {
-	postpos total_length ge { pop exit } if
+	postpos total_length ge {
+          % Fill the rest with .notdef
+          1 numglyphs 1 sub { 1 index exch /.notdef put } for
+          exit
+        } if
 	% No name available, /postnames will be defined as an empty
 	% array and the glyph won't get a name attached.
 	postglyphs postpos //get_from_stringarray exec
@@ -630,9 +634,7 @@
         (Windows Type 1 Installer V1.0) search {
           pop pop pop
           .latin1isodict postnames {
-            dup //null ne
-            % dup /.notdef ne and
-            {
+            dup /.notdef ne {
               2 copy known {
                 TTFDEBUG { (ignore post table that redefines ISOLatin1Encoding glyph name ) print dup == flush } if
                 /.broken_post //true def
@@ -677,13 +679,6 @@
 
       .broken_post {
         pop
-        0 1 postnames length 1 sub {
-          postnames 1 index get null eq {
-            postnames 1 index /.notdef put
-          } if
-          pop
-        } for
-
         [ postnames aload length 1 roll ]
       } if
     }



More information about the gs-cvs mailing list