java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Hi,

I am using FOP to convert an fo file to pdf. To enable usage of certain fonts a metric file ought to be created. To do this, the command given below needs to be executed.

java -cp build\fop.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\ba

tik.jar org.apache.fop.fonts.apps.TTFReader C:\fonts\Symbol.ttf

C:\symbol.xml

But I get this exception.

TTF Reader v1.1.1

Reading C:\fonts\Symbol.ttf...

Number of glyphs in font: 192

Unicode cmap table not present

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:507)

at java.util.ArrayList.get(ArrayList.java:324)

at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:449)

at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:439)

at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:222)

at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:184)

What could be the problem? This does not arise for fonts like arial or times new roman. I get the same error for Webdings, Wingdings, OCR. .. How can this be resolved? Please help.

[1159 byte] By [archnaa] at [2007-10-2 16:49:07]
# 1
Apache has some nice mailing lists, you know? Maybe you should go and ask the people that actually made the tools.
CeciNEstPasUnProgrammeura at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 2
Ok! Thanks!
archnaa at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 3
By the way, could it be possible that you need font definitions with unicode charsets?
CeciNEstPasUnProgrammeura at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 4
Yep! Cmap table is not present for the selected fonts. How do I include this?
archnaa at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 5
> Yep! Cmap table is not present for the selected> fonts. How do I include this?Get new font definitions.
CeciNEstPasUnProgrammeura at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 6
Sorry but how can I do this?
archnaa at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...
# 7
> Sorry but how can I do this?Go to whoever created those font files and ask if they have font definitions for unicode.Though whether that's really the problem is just a guess. Sounds like it, though.
CeciNEstPasUnProgrammeura at 2007-7-13 18:00:19 > top of Java-index,Java Essentials,Java Programming...