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]> |
Jeong, IMO the log message is still unclear. It should explain what glyph name is used for a glyph when a name is not available in 'post'. Igor. ----- Original Message ----- From: "Jeong Kim" <[email protected]> To: "'Igor V. Melichev'" <[email protected]>; "'gs-code-review'" <[email protected]> Sent: Tuesday, August 26, 2003 5:45 AM Subject: RE: [gs-code-review] Fix for Bug 686961 - Can't open a PDF file in GS 8_10 (but it works in GS 8_00). > Igor and Reviewers, > > I modified the log message as follows, > > Log: > When Glyph names data is not available for a TrueType Format 2.0 font, > rangecheck error occured. It was due to the termination condition > check code in the bottom of the data retrieving loop. The check code > was moved to the top of the loop and now fixed. Bug#686961. > > Jeong > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of > > Igor V. Melichev > > Sent: Tuesday, August 26, 2003 3:28 AM > > To: Jeong Kim; 'gs-code-review' > > Subject: Re: [gs-code-review] Fix for Bug 686961 - Can't open > > a PDF file in GS 8_10 (but it works in GS 8_00). > > > > > > 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 > > > > > > > _______________________________________________ > > gs-code-review mailing list > > [email protected] > > http://www.ghostscript.com/mailman/listinfo/gs-code-review > > > > _______________________________________________ > gs-code-review mailing list > [email protected] > http://www.ghostscript.com/mailman/listinfo/gs-code-review >