Hi Max,

thanks for pointing me to fontbox. As I did not find a repository with a
trunk, I had a look into fontbox-0.8.0-incubating. They have quite clean
code to parse TrueType files. But they are also not able to read any
OpenType data. They are even not able to read kerning data as FOP can

So I think, I will continue my OpenType effort inside FOP for now, but
we should consider to merge the font parsing into fontbox.

Lets see what I can do in FOP right now. Currently I have all the
current features refactured and written some tests against real fonts.
I'm on the way to get kerning info out of the OpenType GPOS table. I
have already written 19 test classes and added/modified 129 production

Best Regards

e-mail: alexanderk...@gmx.net
web:    www.alexanderkiel.net

On Tue, 2009-09-22 at 11:22 +0200, Max Berger wrote:
> Alexandar,
> on a completely different note:
> It may be interesting to also look into fontbox (part of pdfbox),
> which is now also an apache project, and therefore we could use source
> synergy.
> http://incubator.apache.org/pdfbox/
> For the issue you've mentioned: This may be due so some issues with
> CID fonts not properly defining ascent and descent, but I don't have a
> reference for it. We would probably need some fonts to test and check.
> Max
> 2009/9/21 Alexander Kiel <alexanderk...@gmx.net>:
> > Hi,
> >
> > as I'm currently on the way to redesign the TrueType/OpenType file
> > reading, from time to time I stumble over some odd things.
> >
> > But instead of blindly refactoring, I think its better to ask you
> > before.
> >
> > Fonts have among other things the properties ascent, descent and
> > fontBBox which are defined in the PDF spec chapter 5.7 Font Descriptors.
> >
> > If I look into PDFFactory rev. 800217 line 1445 - 1483 method
> > makeFontDescriptor, I see two constructor calls, one for CID fonts and
> > one for the other fonts. For CID fonts the constructor of
> > PDFCIDFontDescriptor is called and for the others the constructor of
> > PDFFontDescriptor is called. PDFCIDFontDescriptor is a subclass of
> > PDFFontDescriptor.
> >
> > The odd thing here is, that the call of PDFCIDFontDescriptor doesn't use
> > the ascent nor the descent of the font descriptor. Instead it uses some
> > quantities out of the fontBBox to feed the PDFFontDescriptor. This can
> > be seen inside PDFCIDFontDescriptor rev. 679326.
> >
> > So as fontBBox, ascent and descent don't be the same thing, I would
> > recommend to change this. But this would properly break some things,
> > because we would get other values for ascent and descent in CID fonts.
> >
> >
> > Best Regards
> > Alex
> >
> > -
> > e-mail: alexanderk...@gmx.net
> > web:    www.alexanderkiel.net
> >
> >

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to