Bug 688841 - Rangecheck error with the CJK unicode font
Summary: Rangecheck error with the CJK unicode font
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.54
Hardware: All All
: P4 blocker
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-20 22:37 UTC by Subrahmanyan K.H.
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 130
Word Size: ---


Attachments
PostScript document with CJK font reference (199 bytes, application/postscript)
2006-08-20 22:41 UTC, Subrahmanyan K.H.
Details
Error text file (2.27 KB, text/plain)
2006-08-20 22:44 UTC, Subrahmanyan K.H.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Subrahmanyan K.H. 2006-08-20 22:37:39 UTC
Hi,
	We have a Unicode CJK font, when we use that in PostScript with 
selectfont and try to view the Postscript document with GhostScrpt, we are 
getting the 'rangecheck' error. This is happening both on windows and unix, in 
gs 8.54 and 8.53.

Thanks
Subbu.
Comment 1 Subrahmanyan K.H. 2006-08-20 22:41:31 UTC
Created attachment 2420 [details]
PostScript document with CJK font reference

PostScript document, which refers to the CJK font and has the problem.
Comment 2 Subrahmanyan K.H. 2006-08-20 22:44:27 UTC
Created attachment 2421 [details]
Error text file

This is the error we get when we try to view the PS file with GS.
Comment 3 Subrahmanyan K.H. 2006-08-20 22:54:55 UTC
Initially we had only one font (amwt_f1.ttf). To improve the PS transformation, 
we requested our font vendor to split the font.
They split the font into 2 subsets, one with all CJK characters and one with 
non-CJK characters. Now with the CJK font we are getting the 'rangecheck' error 
while loading the font. 
Please provide the FTP site details, so that I can upload the font.
Comment 4 Ray Johnston 2006-08-21 09:07:33 UTC
I've modified the test file to use AMWT_F1_CJK_test.TTF and the file fails
with the same error message, so I do not require the 'test2' font.
Comment 5 Ray Johnston 2006-08-21 09:39:16 UTC
The problem was an 'off by one' condition in the "get_from_stringarray" procedure.

*** /HEAD/lib/gs_ttf.ps Wed Aug  2 12:04:50 2006
--- ./gs_ttf.ps Mon Aug 21 09:37:10 2006
***************
*** 493,499 ****
      get
    } {
      exch {                % o ()
!       2 copy length gt {
          length sub
        } {
          exch get exit
--- 493,499 ----
      get
    } {
      exch {                % o ()
!       2 copy length ge {
          length sub
        } {
          exch get exit
Comment 6 Ray Johnston 2008-09-03 08:53:47 UTC
Update customer ID for tracker