Generating font metrics file for FOP in Cocoon
Posted by gregster on 04 Nov 2008 in Documentation
To run the generator for the metrics files:
cd <path/to/cocoon>WEB-INF/lib/
Then run this:
java -cp fop-0.20.5.jar:xercesImpl-2.9.0.jar:xml-apis-1.3.04.jar org.apache.fop.fonts.apps.TTFReader <path/to/font-name.ttf> <path/to/expected/output.xml>
Each version of Cocoon is likely to have different version numbers for the jar files, so make sure you have them right before starting (copying and pasting the above likely won't work). Also, the delimiter for the jars is not the same on Windows and *nix - the above uses colons (*nix). Use semicolons for Windows.
I've generated the metrics files for all DejaVu fonts and the base Gentium files also. Find them here.