Not able to render Chinese Fonts through FOP

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.
**java.io.EOFException: 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
    $CMD $FONT_DIR/$1 $METRICS_DIR/$2
else
    echo Usage : sh ttfConvert.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
fi

Any help in this regard is greatly appreciated.

Thanks & Regards,
Charanpreet.

Received on Wednesday, 20 February 2008 16:44:20 UTC