Re: Fix for Bug 686961 - Can't open a PDF file in GS 8_10 (but it works in GS 8_00).

"Igor V. Melichev" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Fine with me, except the log message should better explain the new behavior.
The words "Now fixed" may have too many interpretations.

Igor.


----- Original Message ----- 
From: "Jeong Kim" <[email protected]>
To: "'gs-code-review'" <[email protected]>
Sent: Sunday, August 24, 2003 4:15 AM
Subject: [gs-code-review] Fix for Bug 686961 - Can't open a PDF file in GS
8_10 (but it works in GS 8_00).


> Reviewers,
>
> When an MS TrueType Format 2.0 font does not have Glyph names data, the
> rangecheck error occurs.
>
> Following code segment (line 461-467 in gs_ttf.ps) is for building Glyph
>
> names array for MS TrueType Format 2.0,
>
>       [ numglyphs 1 sub {
> postglyphs postpos get <-----
>         postglyphs postpos 1 add 2 index getinterval cvn
> exch postpos add 1 add /postpos exch def
> postpos postglyphs length ge { exit } if
>       } repeat
>       ] /postnames exch def
>
> /postpos is the pointer value for the position where Glyph names data
> starts. When Glyph names data is not included in a font, /postpos value
> is
> equal to the length of the whole 'post' table data (/postglyphs) and
> 'get'
> operator in the second line of the code segment above makes invalid
> access
> to the data.
>
> To avoid this situation mentioned, I moved the termination condition
> checking code in the last of the loop to the first.
>
>       [ numglyphs 1 sub {
> postpos postglyphs length ge { exit } if <-----
> postglyphs postpos get
>         postglyphs postpos 1 add 2 index getinterval cvn
> exch postpos add 1 add /postpos exch def
>       } repeat
>       ] /postnames exch def
>
> Now the condition checking code makes the process exit the loop when
> Glyph
> names data is not available and no error occurs.
>
> Jeong
>
> Log:
> When Glyph names data is not available for a TrueType Format 2.0 font,
> rangecheck error occured. Now fixed. Bug#686961.
>
> _______________________________________________
> gs-code-review mailing list
> [email protected]
> http://www.ghostscript.com/mailman/listinfo/gs-code-review
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.