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

mpsuzuki at ghostscript.com mpsuzuki at ghostscript.com
Mon Jan 28 01:58:55 PST 2008


Author: mpsuzuki
Date: 2008-01-28 01:58:54 -0800 (Mon, 28 Jan 2008)
New Revision: 8508

Modified:
   trunk/gs/lib/gs_ttf.ps
Log:
Fix (TT): Fix a bug in /getinterval_from_stringarray

DETAILS:

getinterval_from_stringarray is a procedure defined to
extract a substring from long table of TrueType font.
When a table is too long to fit into 16bit-length string
object in PostScript, gs_ttf.ps split the table into
the array of strings. When getinterval_from_stringarray
is requested to extract a string which starts in one
member and ends in following member, it returns a string
that only the content of the first member is copied.
There was a wrong conditional that made the substring
extraction aborted. It was fixed to return the correct
substring.

By this fix, bug 689593 (IPA font 2007 edition cannot
be parsed correctly) is closed.

EXPECTED DIFFERENCES:

None.


Modified: trunk/gs/lib/gs_ttf.ps
===================================================================
--- trunk/gs/lib/gs_ttf.ps	2008-01-28 08:50:10 UTC (rev 8507)
+++ trunk/gs/lib/gs_ttf.ps	2008-01-28 09:58:54 UTC (rev 8508)
@@ -576,13 +576,8 @@
         5 index 4 index 3 index                   % s o p lSi minl from s p minl
         getinterval                               % s o p lSi minl from to
         copy pop                                  % s o p lSi minl
-        3 1 roll                                  % s o minl p lSi
-        sub                                       % s o minl p'
-        3 1 roll add                              % s p' o'
-        dup 3 index length ge 2 index 0 le or {
-          exch exit                               % s o p'
-        } if
-        exch                                      % s o' p'
+        exch pop add exch pop 0 exch              % s 0 p'
+        dup 3 index length ge { exit } if
       } ifelse
     } forall
     pop pop                                       % s



More information about the gs-cvs mailing list