diff -ruN ghostscript-7.07.orig/lib/gs_ttf.ps ghostscript-7.07/lib/gs_ttf.ps --- ghostscript-7.07.orig/lib/gs_ttf.ps 2003-07-29 16:51:55.000000000 +0900 +++ ghostscript-7.07/lib/gs_ttf.ps 2003-07-29 17:44:43.000000000 +0900 @@ -1117,50 +1117,77 @@ /gsubh2v null def tabdict /GSUB .knownget { % if dup /gsubver exch 0 getu32 def - %dup /gsubosl exch 4 getu16 12 add def - %dup /gsubofl exch 6 getu16 12 add def - dup /gsuboll exch 8 getu16 12 add def + %dup /gsubosl exch 4 getu16 def + %dup /gsubofl exch 6 getu16 def + dup /gsuboll exch 8 getu16 def DEBUG { (gsubver: ) print gsubver = %(gsubosl: ) print gsubosl = %(gsubofl: ) print gsubofl = (gsuboll: ) print gsuboll = } if - dup /gsubfmt exch gsuboll 0 add getu16 def + % /gsuboll should be pointed out the LookupList table, but not Lookup table. + % so this is wrong: + % dup /gsubfmt exch gsuboll 0 add getu16 def + dup /gsublc exch gsuboll 0 add getu16 def DEBUG { - (gsubfmt: ) print gsubfmt = + (gsublc: ) print gsublc = } if -% gsubver 16#00010000 eq { % ifelse - gsubfmt 2 eq { % ifelse - dup /gsubocv exch gsuboll 2 add getu16 def - dup /gsubglc exch gsuboll 4 add getu16 def - % hacked by suzuki toshiya at 2001/3/6 - %dup /gsubvog exch gsuboll 6 add gsubglc getinterval def - %dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc getinterval def - dup /gsubvog exch gsuboll 6 add gsubglc 2 mul getinterval def - dup /gsubhog exch gsuboll gsubocv add 4 add gsubglc 2 mul getinterval def + gsublc 0 ne { + 0 1 gsublc 1 sub { + 2 mul /gsubolt exch 2 index exch gsuboll 2 add add getu16 gsuboll add def + dup /gsubltype exch gsubolt 0 add getu16 def + dup /gsublflag exch gsubolt 2 add getu16 def + dup /gsubsubc exch gsubolt 4 add getu16 def DEBUG { - (gsubocv: ) print gsubocv = - (gsubglc: ) print gsubglc = - - (gsubhog->gsubvog ) = - 0 2 gsubhog length 2 sub { % for - dup - gsubhog exch getu16 =only - (->) =only - gsubvog exch getu16 = + (gsubolt: ) print gsubolt = + (gsubltype: ) print gsubltype = + (gsublflag: ) print gsublflag = + (gsubsubc: ) print gsubsubc = + } if + gsubsubc 0 ne { + 0 1 gsubsubc 1 sub { + 2 mul /gsubost exch 2 index exch gsubolt 6 add add getu16 gsubolt add def + dup /substfmt exch gsubost 0 add getu16 def + DEBUG { + (gsubost: ) print gsubost = + (substfmt: ) print substfmt = + } if +% gsubver 16#00010000 eq { % ifelse + gsubltype 1 eq substfmt 2 eq and { % ifelse + dup /gsubocv exch gsubost 2 add getu16 def + dup /gsubglc exch gsubost 4 add getu16 def + % hacked by suzuki toshiya at 2001/3/6 + %dup /gsubvog exch gsubost 6 add gsubglc getinterval def + %dup /gsubhog exch gsubost gsubocv add 4 add gsubglc getinterval def + dup /gsubvog exch gsubost 6 add gsubglc 2 mul getinterval def + dup /gsubhog exch gsubost gsubocv add 4 add gsubglc 2 mul getinterval def + DEBUG { + (gsubocv: ) print gsubocv = + (gsubglc: ) print gsubglc = + + (gsubhog->gsubvog ) = + 0 2 gsubhog length 2 sub { % for + dup + gsubhog exch getu16 =only + (->) =only + gsubvog exch getu16 = + } for + } if + /gsubh2v << 0 2 gsubhog length 2 sub { + dup gsubhog exch getu16 + exch gsubvog exch getu16 + } for >> def + } { + %(UNKNOWN GSUB FORMAT.) = flush + } ifelse +% } { +% (ILLEGAL GSUB VERSION.) = flush +% } ifelse } for } if - /gsubh2v << 0 2 gsubhog length 2 sub { - dup gsubhog exch getu16 - exch gsubvog exch getu16 - } for >> def - } { - %(UNKNOWN GSUB FORMAT.) = flush - } ifelse -% } { -% (ILLEGAL GSUB VERSION.) = flush -% } ifelse + } for + } if pop } if } bind def