You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Partridge, Michael" <Mi...@shps.net> on 2004/10/29 23:14:39 UTC
problem converting TTF using TTFReader
I get the following output when attempting to generate a font metrics file from an OCR true type font:
--------------------------------------------------------------------------
TTF Reader v1.1.1
Reading /home/mpartridge/fonts/OCR/OCR-A.TTF...
Number of glyphs in font: 115
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)
--------------------------------------------------------------------------
Here is the command line I'm using (on Solaris):
java -cp ~/src/fop-0.20.5/build/fop.jar:~/src/fop-0.20.5/lib/avalon-framework-cvs-20020806.jar:~/src/fop-0.20.5/lib/xercesImpl-2.2.1.jar:~/src/fop-0.20.5/lib/xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader ~/fonts/OCR/OCR-A.TTF ~/fonts/OCR/OCR.xml
Is this a problem with the font file itself?
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: problem converting TTF using TTFReader
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Partridge, Michael wrote:
> I get the following output when attempting to generate a font metrics file from an OCR true type font:
...
> 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)
...
> Is this a problem with the font file itself?
Yes. It is common for OCR and barcode fonts to omit the
cmap, for whatever reason.
Try the telliung TTFReader to use winansi encoding, assuming
the character range in the font fits the encodable range.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org