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

ray at ghostscript.com ray at ghostscript.com
Wed Sep 6 23:41:20 PDT 2006


Author: ray
Date: 2006-09-06 23:41:20 -0700 (Wed, 06 Sep 2006)
New Revision: 7024

Modified:
   trunk/gs/lib/gs_ttf.ps
Log:
Fix rangecheck problem (688841) and wrong .notdef appearance (688803)
for customer #130.


Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps	2006-09-05 21:08:03 UTC (rev 7023)
+++ trunk/gs/lib/gs_ttf.ps	2006-09-07 06:41:20 UTC (rev 7024)
@@ -493,7 +493,7 @@
     get
   } {
     exch {                % o ()
-      2 copy length gt {
+      2 copy length ge {
         length sub
       } {
         exch get exit
@@ -1374,12 +1374,17 @@
         exch
       } if
       2 index 1 index known
-      1 index /.notdef ne and {	%		ignore extra .notdef glyphs
-		% The same name maps to more than one glyph.
-		% Change the name.
-	pop dup .nname 3 index 2 index 2 index put
-      } if
-      2 index exch 3 -1 roll put
+      { dup /.notdef eq {
+	  pop pop	% discard duplicate .notdef glyphs
+        } {
+	  % The same name maps to more than one glyph. Change the name.
+	  pop dup .nname 3 index 2 index 2 index put
+          2 index exch 3 -1 roll put
+        } 
+        ifelse
+      } {
+        2 index exch 3 -1 roll put	% unique name
+      } ifelse
     } for exch pop
 		% If there is no .notdef entry, map it to glyph 0.
   dup /.notdef known not { dup /.notdef 0 put } if



More information about the gs-cvs mailing list