Jeremias Maerki wrote:
The OpenType reader code is in TTFReader. OpenType is an evolution of
OK, I had to hack the TTFReader, TTFFile, and FontFileReader classes to handle the case of OpenType fonts that use CFF rather than TrueType for glyph information. There are tables that are not used by CFF fonts so I had to capture the version value and condition the processing of the loca, glyf, and kerning tables. I also added a getTagString() method to TTFDirTabEntry so I could write out the list of tables with readable tag names for debugging.
In CFF fonts, the kerning table is replaced by the more sophisticated glyph positioning table (GPOS). This table would need to be processed in order to provide CFF-related kerning information, which is certainly beyond what I can do at the moment (if at all, although it can't be that hard).
So now I can generate a font metrics file (without kerning info) for my CFF-based OpenType font.
Since the OpenType font metrics wouldn't include the kerning I don't know if it would be useful for full FOP, but it should be sufficient to allow basic font metrics for CFF OpenType fonts.
I haven't had a chance yet to test this with the XML font data-based font metrics because it's the end of the day and now I can't find the font metrics class that would apply (as opposed to the AWTFontMetrics class).
Let me know if I should provide patches to someone. I used the 0.20.2-maintenance code as my base.
Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 9030 Research Blvd, #410 Austin, TX 78758 (512) 372-8122
[EMAIL PROTECTED] www.innodata-isogen.com