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 Florence Deforge <fl...@europe.planete-inter.fr> on 2002/11/13 19:03:35 UTC

error while generating a font metric file

Hi 
I'm trying to add wingding font to fop and face a problem. I'm afraid I have not fully understood how it is supposed to work, anyway maybe someone will help. 
So I read the doc on xml.apache.org/fop/fonts.html and wrote the following command line to generate the font metrics : 

java -cp build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar org.apache.fop.fonts.apps.TTFReader c:\winnt\fonts\wingding.ttf ttfwingding.xml


The response is : 
TTF Reader v1.1.1

Reading c:\winnt\fonts\wingding.ttf...

Number of glyphs in font: 226
Unicode cmap table not present
java.util.NoSuchElementException: Vector Enumeration
        at java.util.Vector$1.nextElement(Unknown Source)
        at org.apache.fop.fonts.TTFFile.createCMaps(TTFFile.java:415)
        at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:404)
        at org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:181)
        at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:143)

Anyone knows what should be done ? 

Note that following the example in doc, the command line should be :   
java -cp ...  org.apache.fop.fonts.apps.TTFReader c:\winnt\fonts\wingding.ttf c:\winnt\fonts\wingding.ttf ttfwingding.xml
But this results in a help message showing TTFReader calls options

Any explanation greatly appreciated.
Florence

Re: error while generating a font metric file

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Florence Deforge wrote:

> Actually I'm just starting to experiment on the following process :
> I receive data from an application which generates an XML file from Excel
> and Word data.
> XML nodes which are created to represent Word data have an attribute wich
> refers to a CSS stylesheet, and childs (representing paragraphs with
> html-like tags) may have "style" attributes that contains info on fonts or
> other style stuff.
> This is fine to generate html that "looks like" the original Word data with
> an xsl stylesheet that link to the CSS.

I would say xml+css is more likely presentational format, oriented for 
CSS-aware applications. Therefore you have to process CSS. Look in the 
archive, I have explained recently how it could be done.

> But with fop I don't know how to refer either to the CSS stylesheet nor to
> take into account the other style attributes ...

You cannot. You have to parse CSS yourself and query style information.

>  which, in the real world,
> will sometimes contain wingding font !

That means somebody have to fix winding font :)

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: error while generating a font metric file

Posted by Florence Deforge <fl...@europe.planete-inter.fr>.
OK, I tried with other fonts and it works fine.

Actually I'm just starting to experiment on the following process :
I receive data from an application which generates an XML file from Excel
and Word data.
XML nodes which are created to represent Word data have an attribute wich
refers to a CSS stylesheet, and childs (representing paragraphs with
html-like tags) may have "style" attributes that contains info on fonts or
other style stuff.
This is fine to generate html that "looks like" the original Word data with
an xsl stylesheet that link to the CSS.
But with fop I don't know how to refer either to the CSS stylesheet nor to
take into account the other style attributes ... which, in the real world,
will sometimes contain wingding font !

Any hint is welcome, in case you feel this has to deal with the fop issues
...

Thanks anyway
Florence

----- Original Message -----
From: "Oleg Tkachenko" <ol...@multiconn.com>
To: <fo...@xml.apache.org>
Sent: Thursday, November 14, 2002 12:19 PM
Subject: Re: error while generating a font metric file


> Florence Deforge wrote:
>
> > I'm trying to add wingding font to fop and face a problem. I'm afraid I
> > have not fully understood how it is supposed to work, anyway maybe
> > someone will help.
> > So I read the doc on xml.apache.org/fop/fonts.html and wrote the
> > following command line to generate the font metrics :
> >
> > java -cp
> >
build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;
lib\batik.jar
> >
> > org.apache.fop.fonts.apps.TTFReader c:\winnt\fonts\wingding.ttf
> > ttfwingding.xml
> >
> > The response is :
> > TTF Reader v1.1.1
> >
> > Reading c:\winnt\fonts\wingding.ttf...
> >
> > Number of glyphs in font: 226
> > Unicode cmap table not present
>
> wingding is not really unicode font, see archive for more
> info:http://marc.theaimsgroup.com/?l=fop-dev&m=100653574622185&w=2.
> Look for unicode version of the font or try another one (what about
webdongs?).
>
> --
> Oleg Tkachenko
> eXperanto team
> Multiconn Technologies, Israel
>
>


Re: error while generating a font metric file

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Florence Deforge wrote:

> I'm trying to add wingding font to fop and face a problem. I'm afraid I
> have not fully understood how it is supposed to work, anyway maybe
> someone will help.
> So I read the doc on xml.apache.org/fop/fonts.html and wrote the
> following command line to generate the font metrics :
>
> java -cp
> build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar 
>
> org.apache.fop.fonts.apps.TTFReader c:\winnt\fonts\wingding.ttf
> ttfwingding.xml
>
> The response is :
> TTF Reader v1.1.1
>
> Reading c:\winnt\fonts\wingding.ttf...
>
> Number of glyphs in font: 226
> Unicode cmap table not present

wingding is not really unicode font, see archive for more 
info:http://marc.theaimsgroup.com/?l=fop-dev&m=100653574622185&w=2.
Look for unicode version of the font or try another one (what about webdongs?).

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel