[gs-cvs] gs/lib

Igor Melichev igor at casper.ghostscript.com
Fri Sep 20 08:35:24 PDT 2002


Update of /cvs/ghostscript/gs/lib
In directory casper:/tmp/cvs-serv14361/gs/lib

Modified Files:
      Tag: GS_7_0X
	gs_ttf.ps 
Log Message:
Fix : Overlapping format 4 CMap ranges, while arguably buggy, are commonly
found in quite a few popular CJK TrueType fonts.
Patch from Anthony Fok Tung-Ling.


Index: gs_ttf.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/gs_ttf.ps,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -u -d -r1.9.2.2 -r1.9.2.3
--- gs_ttf.ps	2 Apr 2002 13:55:03 -0000	1.9.2.2
+++ gs_ttf.ps	20 Sep 2002 15:35:22 -0000	1.9.2.3
@@ -470,7 +470,11 @@
 		% Hack for fonts that have only 0x0000 and 0xf000 ranges
       %dup 16#e000 ge { 255 and } if
       % the previous line is obstructive to CJK fonts, so it was removed
-      exch sub 0 .max dup { 0 putglyph } repeat
+      exch sub dup dup 0 ge {
+	{ 0 putglyph } repeat
+      } {
+	code add /code exch def
+      } ifelse
       ecode scode sub 1 add add numcodes add /numcodes exch def
       /delta iddelta i2 gets16 def
       DEBUG {




More information about the gs-cvs mailing list