I think I should be able to do this using the font metric support in the current development version of FOP but I'm having a hard time figuring out exactly what bits are involved. I think where I'm stuck is on what code actually takes a font and generates a metrics file from it. I've traced down to where the XML font metrics files are loaded but it appears that the font metrics files just exist.
Also, I need to be able to process OpenType fonts and it's not clear from the code and the archives whether that's currently implemented, although I did see a couple messages discussing it.
What I want to implement is an XSLT extension function something like this:
public static int renderedStringLength(String str, String fontFamilyName, int fontSize) { Font font = magicFopFontHelper.getFont(fontFamilyName, fontSize); return font.getWordWidth(str); }
Obviously, it's the "magicFopFontHelper" class that I'm not sure how to go about constructing.
Can someone point me in the right direction?
Thanks,
Eliot -- W. Eliot Kimber Professional Services Innodata Isogen 9030 Research Blvd, #410 Austin, TX 78758 (512) 372-8122
[EMAIL PROTECTED] www.innodata-isogen.com