Not able to render Chinese Fonts through FOP

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Not able to render Chinese Fonts through FOP

Charanpreet Arora
Dear All,

I'm trying to generate XML metrics file from custom fonts (ttf) by executing FOP's TTFReader. (on Mac OS X, Ver 10.4) It keeps giving the following error:

TTF Reader for Apache FOP 0.94

Parsing font...
Reading fonts/MHeiGB-Bold.ttf...
Error while building XML font metrics file. Reached EOF, file size=0

I have added all required jars in the classpath. Below is the snapshot of the script:

export LIB=../lib
export CMD="java -cp $LIB/fop.jar:$LIB/avalon-framework-4.2.0.jar:$LIB/xml-apis-1.3.02.jar:"
export CMD="$CMD:$LIB/xercesImpl-2.7.1.jar:$LIB/xalan-2.7.0.jar:$LIB/serializer-2.7.0.jar org.apache.fop.fonts.apps.TTFReader"
export FONT_DIR='fonts'
export METRICS_DIR='xml'

if [ "$#" = "2" ] ; then
    echo Usage : sh arg1 arg2
    echo where arg1 = name of ttf file in font dir
    echo and   arg2 = name of metrics file to be created in xml dir

Any help in this regard is greatly appreciated.

Thanks & Regards,