Page 1 of 1

Registering fonts with FOP

Posted: Fri Mar 15, 2013 9:42 pm
by martindholmes
I'm trying to follow the instructions here:

http://www.oxygenxml.com/doc/ug-editor/ ... n-FOP.html

to add fonts to the built-in FOP, on Linux, but the suggested script fails.
line 3: export: `-cp': not a valid identifier
line 3: export: `lib/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xercesImpl.jar': not a valid identifier
line 4: export: `org.apache.fop.fonts.apps.TTFReader': not a valid identifier
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/share/fonts/truetype/gentium-plus/GentiumPlus-R/ttf

The jar files are all where they're supposed to be. I must be missing something obvious. Can anyone see what it is?

All help appreciated,
Martin

Re: Registering fonts with FOP

Posted: Fri Mar 15, 2013 9:55 pm
by martindholmes
I was able to get a little further by adding two more libraries to the classpath, and running a complete literal command instead of using the exports:

java -cp lib/fop.jar:lib/avalon--framework-4.2.0.jar:lib/xercesImpl.jar:lib/commons-logging-1.1.1.jar:lib/commons-io-1.3.1.jar:lib/xmlgraphics-commons-1.5.jar:lib/xml-apis.jar org.apache.fop.fonts.apps.TTFReader /usr/share/fonts/truetype/gentium-plus/GentiumPlus-R.ttf GentiumPlus-R.xml

Two additional libraries are suggested by the documentation here:

http://xmlgraphics.apache.org/fop/1.1/fonts.html

and the last two I figured out based on errors.

Hope this helps someone else.

Cheers,
Martin

Re: Registering fonts with FOP

Posted: Mon Mar 18, 2013 1:05 pm
by sorin_ristache
Hello,

Thank you for reporting the error. We updated the FOP library in the lib directory but not the classpath in the script for generating the font metrics file. I corrected the script in the User Manual, the next Oxygen User Manual version will include the corrected script.


Thank you,
Sorin