You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by weffen zhang <we...@yahoo.com> on 2001/04/13 07:38:08 UTC

Why cannot generate xml metrics file????? bug?

Hello,

i have sent an email which mentioned this problem.
but no an reply.. only i encountered such a problem?

It is: 
i want to generate the xml metrics file of mingliu.ttc
but got error:

TTF Reader v1.1.1

Reading mingliu.ttc...

This is a TrueType collection file with2 fonts
Containing the following fonts:
* MingLiU
PMingLiU
Number of glyphs in font: 22550
Postscript format 3
java.lang.ArrayIndexOutOfBoundsException
        at
org.apache.fop.fonts.TTFFile.readCMAP(TTFFile.java:214)
        at
org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:395)
        at
org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:183)
        at
org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:145)


how to solve?? Thanks!

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Why cannot generate xml metrics file????? bug?

Posted by Rafal Maczewski <fo...@pa70.ziebice.sdi.tpnet.pl>.
Hi,

There is a small bug in the TTFFile.java that prevents xml metrics file
generation for some fonts. The patch is included below. I've checked that
this fixes the problem with mingliu.ttf file (I don't have the mingliu.ttc
collection).

Hope this helps,

Rafal Maczewski


/* -- $Id: TTFFile.java,v 1.3 2001/03/22 18:16:10 fotis Exp $ --


*** src/org/apache/fop/fonts/TTFFile.java.1.3 Thu Mar 22 19:16:10 2001
--- src/org/apache/fop/fonts/TTFFile.java Fri Apr 13 10:04:52 2001
***************
*** 179,185 ****
              int startRangeOffset = in.getCurrentPos();

              for (int i = 0; i < (cmap_segCountX2 / 2); i++) {
!                 cmap_rangeOffsets[i] = in.readTTFShort();
              }

              int glyphIdArrayOffset = in.getCurrentPos();
--- 179,185 ----
              int startRangeOffset = in.getCurrentPos();

              for (int i = 0; i < (cmap_segCountX2 / 2); i++) {
!                 cmap_rangeOffsets[i] = in.readTTFUShort();
              }

              int glyphIdArrayOffset = in.getCurrentPos();



----- Original Message -----
From: "weffen zhang" <we...@yahoo.com>
To: <fo...@xml.apache.org>
Sent: Friday, April 13, 2001 7:38 AM
Subject: Why cannot generate xml metrics file????? bug?


> Hello,
>
> i have sent an email which mentioned this problem.
> but no an reply.. only i encountered such a problem?
>
> It is:
> i want to generate the xml metrics file of mingliu.ttc
> but got error:
>
> TTF Reader v1.1.1
>
> Reading mingliu.ttc...
>
> This is a TrueType collection file with2 fonts
> Containing the following fonts:
> * MingLiU
> PMingLiU
> Number of glyphs in font: 22550
> Postscript format 3
> java.lang.ArrayIndexOutOfBoundsException
>         at
> org.apache.fop.fonts.TTFFile.readCMAP(TTFFile.java:214)
>         at
> org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:395)
>         at
> org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:183)
>         at
> org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:145)
>
>
> how to solve?? Thanks!
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org