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,

Now the log message and the code looks good. Thank you.
Did you run the regression test locally ?
(I'm still aware about some smart cases with Encoding in PDF.
I recall that I've put appropriate test to compoarefiles).
If you did run, please commit.
If not, it would be useful to run it locally before commit.

Igor.

----- Original Message ----- 
From: "Jeong Kim" <[email protected]>
To: "'Igor V. Melichev'" <[email protected]>; "'gs-code-review'"
<[email protected]>
Sent: Saturday, August 30, 2003 12:12 PM
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,
>
> I changed the pathch and log message as your advice.
>
> Jeong
>
> Log:
> When Glyph names data is not available for a TrueType Format 2.0 font,
> rangecheck error occured. It was due to an attempt to get the data even
> when
> it is not available. Now when no name data is available, /postnames is
> defined
> as an empty array and the glyph won't get a name attached. Fixes
> Bug#686961.
>
> Index: lib/gs_ttf.ps
> ===================================================================
> RCS file: /cvs/ghostscript/gs/lib/gs_ttf.ps,v
> retrieving revision 1.32
> diff -r1.32 gs_ttf.ps
> 461a462,464
> >       postpos postglyphs length ge { exit } if
> >       % No name available, /postnames will be defined as an empty
> >       % array and the glyph won't get a name attached.
> 465d467
> <       postpos postglyphs length ge { exit } if
>
> > -----Original Message-----
> > From: Igor V. Melichev [mailto:[email protected]]
> > Sent: Thursday, August 28, 2003 12:35 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).
> >
> >
> > Jeong,
> >
> > Please add comment to code near 'exit' :
> >
> > % No name available, the glyph won't get a name attached.
> >
> > (I guess I understand this correctly. Change the comment
> > appropriately if I don't). Also I'd like a sentence like this
> > to be added to the log message.
> >
> > In general, I'm unclear what happens in there.
> > In PS Type 42 fonts require glyph names.
> > So if a name is not attached, the glyph isn't accessible.
> >
> > In PDF the situation is different. A TT font don't require
> > glyph names, because glyphs may be accessed by glyph indices.
> > This happens if there is no Encoding specified in the PDF
> > font dictionary. But if an Encoding presents, glyph names are
> > still required.
> >
> > Since we emulate PDF interpreter with PS interpreter, glyph
> > names are necessary for PS interpreter to emulate a TT font
> > embedded in PDF even when the latter has no Encoding. In this
> > case glyph names may be chosen arbitrary.
> >
> > With CID fonts glyph names are not used.
> >
> > I'm not sure that you understand all consequences of your
> > patch. Please check for sure. I would appreciate if you
> > explain the whole behavior of the new code in the log message
> > or in additional comments.
> >
> > Igor.
> >
>
> _______________________________________________
> 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.