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 lmhelp <lm...@wanadoo.fr> on 2008/08/05 20:03:53 UTC

FOP - FONTS - expl. verdana

Hi everyone,

Thank you for reading my post.
Let me tell you what my problem is.
Let's consider the following files.

==========================
XML file (projectteam.xml)
==========================
<?xml version="1.0" encoding="UTF-8"?>
<projectteam>
  <projectname>The Killer Application</projectname>
  <member>
    <name>John Doe</name>
    <function>lead</function>
    <e mail>jon.doe@killerapp.fun
  </member>
  <member>
    <name>Paul Coder</name>
    <function>dev</function>
    <e mail>paul.coder@killerapp.fun
  </member>
  <member>
    <name>Max Hacker</name>
    <function>dev</function>
    <e mail>max.hacker@killerapp.fun
  </member>
  <member>
    <name>Donna Book</name>
    <function>doc</function>
    <e mail>donna.book@killerapp.fun
  </member>
  <member>
    <name>Henry Tester</name>
    <function>qa</function>
    <e mail>henry.tester@killerapp.fun
  </member>
</projectteam>

(Notice that I replace "email" by "e mail" because otherwise a
transformation was operated).

=============================
XSL file (projectteam2fo.xsl)
=============================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
  <xsl:output method="xml" version="1.0" omit-xml-declaration="no"
indent="yes"/>
  <!-- ------------------------- -->
  <!-- root element: projectteam -->
  <!-- ------------------------- -->
  <xsl:template match="projectteam">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simpleA4" page-height="29.7cm"
page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm"
margin-right="2cm">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="simpleA4">
        <fo:flow flow-name="xsl-region-body">
          <fo:block font-size="16pt" font-weight="bold"
space-after="5mm">Project: <xsl:value-of select="projectname"/>
          </fo:block>
          <fo:block font-size="10pt">
            <fo:table table-layout="fixed">
              <fo:table-column column-width="4cm"/>
              <fo:table-column column-width="4cm"/>
              <fo:table-column column-width="5cm"/>
              <fo:table-body>
                <xsl:apply-templates/>
              </fo:table-body>
            </fo:table>
          </fo:block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>
  <!-- ------------------------- -->
  <!-- child element: member     -->
  <!-- ------------------------- -->
  <xsl:template match="member">
    <fo:table-row>
      <xsl:if test="function = 'lead'">
        <xsl:attribute name="font-weight">bold</xsl:attribute>
      </xsl:if>
      <fo:table-cell>
        <fo:block font-family="Courier" font-style="normal"
font-weight="normal">
          <xsl:value-of select="name"/>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell>
        <fo:block>
          <xsl:value-of select="function"/>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell>
        <fo:block font-family="verdana" font-style="normal"
font-weight="normal">
          <xsl:value-of select="email"/>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </xsl:template>
</xsl:stylesheet>

I want to create a PDF file using the following command:
> fop -xml projectteam.xml -xsl projectteam2fo.xsl -pdf projectteam.pdf

As you can see above, I want the "email"'s font to be "verdana".
As you know, "verdana" is not "recognised" by fop.
Something has to be done to do so.

So, I first created a font metrics file out of the
C:\WINDOWS\Fonts\verdana.TTF
true type file (TTF) on my system.

    - I created a directory:
      C:\Program Files\fop\fonts_lea
    - I copied the above TTF file in that directory.
    - I launched the following command to create the font metrics file:
      C:\Program Files\fop> java -cp "build\fop.jar"
org.apache.fop.fonts.apps.TTFReader \ 
                            -fn verdana fonts_lea\verdana.ttf
fonts_lea\verdana.xml

It succeeded.

I then edited the following file: C:\Program Files\fop\conf\userconfig.xml
Its contents are:

<configuration>
  <entry>
    <key>fontBaseDir</key>
    <value>file:///C:\"Program Files"\fop\fonts_lea</value>
  </entry>
  <fonts>
    <fontisque metrics-url="verdana.xml" kerning="yes"
embed-url="verdana.TTF">
      <font-triplet name="verdana" style="normal" weight="normal"/>
    </fontisque>
  </fonts>
</configuration>

(I do not understand why but I have had to replace "font" by "fontisque"
above 
because the two lines which contain the word were not printed in the
preview.
Sorry about that).

Now, if I launch the following command, I have the following output:

> fop -c "C:\Program Files\fop\conf\userconfig.xml" -xml projectteam.xml \
  -xsl projectteam2fo.xsl -pdf projectteam.pdf

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] Failed to read a font metrics file: Invalid font metrics file: null
(spec must not be null)
[INFO] [1]
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[INFO] Parsing of document complete, stopping renderer

Can anyone tell me what I might have done wrong?
Thanks in advance.

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18836748.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by "J.Pietschmann" <j3...@yahoo.de>.
lmhelp wrote:
>> That's a very --original way to specify a pathname containing a space.
>> I don't think I've ever seen that before. Does Windows even accept it?
> I do not know if you are joking or not but Windows unfortunately does.

That's a common confusion: Most Windows programs interpret quotes
in command lines, config files, registry keys and similar places
where whitespace may be significant as a parameter separator. This
is similar to the interpretation of quotes by the Unix shell.
This doesn't make the quotes part of the pathname, nor does it
indicate that the mechanism can be universally applied.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Thank you.
This was what I was doing when I received your answer... !
I will let you know if it works or not when I have finished.
Thanks.

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847919.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Why don't you make your life easier and upgrade to Apache FOP 0.95 and
use the "directory" tag to automatically register your fonts in FOP?
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics
No more XML font metric files and font base URL.

Just: <directory>C:\Program Files\fop\fonts_lea</directory>
(not possible with 0.20.5)

Otherwise, I'd replace all the backslashes with slashes in your file URL.
URLs use forward slashes. Only Windows file paths use backslashes. Not
that this is likely the problem here but who knows.
 file:///C:/Program%20Files/fop/fonts_lea

On 06.08.2008 11:06:49 lmhelp wrote:
> 
> Thank you again for your answer.
> 
> > Awfully weird, though.
> Yes...
> 
> About the double quotes
> -----------------------
>   You are right, if I copy the following string as an URL in my browser,
>   file:///C:\"Program Files"\fop\fonts_lea,
>   the directory is not found.
> 
>   Whereas if I use file:///C:\Program Files\fop\fonts_lea
>   it is escaped to file:///C:\Program%20Files\fop\fonts_lea
>   and the directory is properly found.
> 
>   So I deleted the double quotes, thanks.
> 
> About the trailing backslash
> ----------------------------
>   I added one.
>   This is now what it looks like:
>   <value>file:///C:\Program Files\fop\fonts_lea\</value>
> 
>   Unfortunately, it is still failing with the same error message.
> 
> Fop -d command line option
> --------------------------
>   So, I tried:
>   # fop -c "C:\Program Files\fop\conf\userconfig.xml" -xml projectteam.xml \
>     -xsl projectteam2fo.xsl -pdf projectteam.pdf -d
>   but no more clues appear, snif!
> 
>   BTW, can you tell me what "IIC" means?
> 
> Thank you for your concern.
> 
> --
> Lmhelp
> -- 
> View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847106.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Nice explanation, thanks.
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18856226.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 6, 2008, at 18:42, lmhelp wrote:

>
> Ok, thank you very much!
> What is that <snip\> tag I can see in your post?

This simply refers to a part of the original post (which you will  
also see abbreviated to 'OP' at times), which has been 'snipped' (=  
cut) to save the recipient the trouble of scrolling through a lot of  
lines that are not relevant to the reply (some may add a clarifying  
attribute, like <snip what="I don't really remember..." />)

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Ok, thank you very much!
What is that <snip\> tag I can see in your post?

-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18855182.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 06.08.2008 15:06:18 lmhelp wrote:
<snip/>
> > No, the font-family is not derived from the filename. The font itself
> > contains the font family name that is to be used. In the case of
> > verdana.ttf that would be "Verdana" (case-sensitive!). 
> 
> Do you mean that one have to look at the TTF file itself to know which 
> name to use?

Yes, or you can just look under what name the font is available if you
install it in your operating system. On Windows, you can double-click a
TrueType font to see its name. Hopefully, we've improved FOP enough by
now that those names are the same as are identified by FOP (wasn't an
easy thing to do).

<snip/>


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Thank you for your answers.

To Alias John Brown:

1) Thank you for the tip about "auto-detect".

You know, I have tried <directory>C:/WINDOWS/Fonts/</directory> instead of 
<directory>C:/Program Files/fop-0.95/fonts_lea/</directory> in fop.xconf
but I have had quite a lot of errors like:
    GRAVE: Unable to load font file:
file:/C:/Windows/Fonts/Mathematica2b.ttf. 
    Reason: TrueType font is not supported: file:
/C:/Windows/Fonts/Mathematica2b.ttf

So I decided to copy the TTF files I was interested in to my directory 
C:/Program Files/fop-0.95/fonts_lea/

2) Apparently, there is no problem with the space in "Program files" nor
with
   the trailing slash /.

To Jeremias:

> No, the font-family is not derived from the filename. The font itself
> contains the font family name that is to be used. In the case of
> verdana.ttf that would be "Verdana" (case-sensitive!). 

Do you mean that one have to look at the TTF file itself to know which 
name to use?

> Yes, sure, otherwise you only have a default font configuration, not
> your custom one.

Ok.
So fop.xconf is not fop's default configuration file and if I want it to
be taken into account, I have to do it explicitly...

... I have to thank you all for your efficiency and for answering so
quickly! 

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18850806.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 06.08.2008 13:12:28 lmhelp wrote:
> 
> Thank you Jeremias.
> 
> Hi everyone,
> 
> So, I've upgraded to fop-0.95.
> 
> I've added the following line to the ../fop-0.95/conf/fop.xconf file:
>   <directory>C:/Program Files/fop-0.95/fonts_lea/</directory>
> (Maybe this is not the right file to update... ?)
> 
> ============================================
> Here is the whole configuration file (fop.xconf) as it is now:
> ============================================
<snip/>

Config file looks good without having actually using it.

> The C:/Program Files/fop-0.95/fonts_lea/ directory contains the TTF file
> verdana.ttf
> which I copied from C:/WINDOWS/Fonts.
> 
> (Tell me if I am wrong:)
> if your TTF file's name is "fontname.ttf" then the font name you have to use 
> in the xsl-fo file is "fontname" (for example: <fo:block
> font-family="fontname">)
> to get it work.

No, the font-family is not derived from the filename. The font itself
contains the font family name that is to be used. In the case of
verdana.ttf that would be "Verdana" (case-sensitive!).

> Once having done that, I launched the following command:
> # fop -c "C:\Program Files\fop-0.95\conf\fop.xconf" -xml projectteam.xml \
>   -xsl projectteam2fo.xsl -pdf projectteam.pdf
> and it worked.
> But I had to put the -c option above...

Yes, sure, otherwise you only have a default font configuration, not
your custom one.

> See you.
> -- 
> View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18849018.html
> Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by John Brown <jo...@hotmail.com>.
lmhelp <lmbox <at> wanadoo.fr> writes:

> 
> 
> Thank you Jeremias.
> 
> Hi everyone,
> 
> So, I've upgraded to fop-0.95.
> 
> I've added the following line to the ../fop-0.95/conf/fop.xconf file:
>   <directory>C:/Program Files/fop-0.95/fonts_lea/</directory>
> (Maybe this is not the right file to update... ?)
>

1) Did you run 'fop -c ../fop-0.95/conf/fop.xconf FO-file PDF-file'?
If you did and it didn't work, add the <auto-detect> tag:

<fonts>
  <directory>C:/Program Files/fop-0.95/fonts_lea/</directory>
  <auto-detect>
</fonts>

Also, if the font is in C:\Windows\Fonts, then you might not
even need the <directory> tag, as I would imagine that
C:\Windows\Fonts is one of the standard locations checked when
<auto-detect> is enabled.

2) Maybe it does not like the space in "Program Files". Try the
short name instead:

C:/Progra~1/fop-0.95_lea

I don't think that the trailing / is necessary, but don't quote me.
I don't have a trailing / in my fop.xconf.




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Thank you Jeremias.

Hi everyone,

So, I've upgraded to fop-0.95.

I've added the following line to the ../fop-0.95/conf/fop.xconf file:
  <directory>C:/Program Files/fop-0.95/fonts_lea/</directory>
(Maybe this is not the right file to update... ?)

============================================
Here is the whole configuration file (fop.xconf) as it is now:
============================================
<?xml version="1.0"?>

<fop version="1.0">

  <base>.</base>
  
  <source-resolution>72</source-resolution>
  <target-resolution>72</target-resolution>
  
  <default-page-settings height="11in" width="8.26in"/>
  
  <renderers>
    <renderer mime="application/pdf">
      <filterList>
        <value>flate</value>
      </filterList>

      <fonts>
        <directory>C:/Program Files/fop-0.95/fonts_lea/</directory>
      </fonts>
    </renderer>

    <renderer mime="application/postscript">
    </renderer>

    <renderer mime="application/vnd.hp-PCL">
    </renderer>

    <renderer mime="image/svg+xml">
      <format type="paginated"/>
      <link value="true"/>
      <strokeText value="false"/>
    </renderer>

    <renderer mime="application/awt">
    </renderer>

    <renderer mime="image/png">
    </renderer>

    <renderer mime="image/tiff">
    </renderer>

    <renderer mime="text/xml">
    </renderer>

    <renderer mime="text/plain">
      <pageSize columns="80"/>
    </renderer>

  </renderers>

</fop>

The C:/Program Files/fop-0.95/fonts_lea/ directory contains the TTF file
verdana.ttf
which I copied from C:/WINDOWS/Fonts.

(Tell me if I am wrong:)
if your TTF file's name is "fontname.ttf" then the font name you have to use 
in the xsl-fo file is "fontname" (for example: <fo:block
font-family="fontname">)
to get it work.

Once having done that, I launched the following command:
# fop -c "C:\Program Files\fop-0.95\conf\fop.xconf" -xml projectteam.xml \
  -xsl projectteam2fo.xsl -pdf projectteam.pdf
and it worked.
But I had to put the -c option above...

See you.
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18849018.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 06.08.2008 12:33:34 lmhelp wrote:
> 
> Hi,
> 
> > Please can you provide the command line output, so list members can 
> > evaluate the error?
> This is exactly the same output as the one of one of the previous posts.
> Here is it:
> 
> [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [INFO] FOP 0.20.5
> [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
> [INFO] building formatting object tree
> [INFO] setting up fonts
> [ERROR] Failed to read a font metrics file: Invalid font metrics file: null
> (spec must not be null)

Aha, that gives me a hint. If I remember correctly, FOP 0.20.5 required
plain filenames in the font area. We later changed metrics-file to
metrics-url. So in 0.20.5 you can't use URLs at all.

> [INFO] [1]
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [ERROR] unknown font verdana,normal,normal so defaulted font to any
> [INFO] Parsing of document complete, stopping renderer 
> 
> > IIC = If I'm Correct
> Oook, thank you for the precision.
> 
> --
> Lmhelp
> -- 
> View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18848495.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Chris Bowditch <bo...@hotmail.com>.
lmhelp wrote:

Hi,

> Thank you again for your answer.

> Fop -d command line option
> --------------------------
>   So, I tried:
>   # fop -c "C:\Program Files\fop\conf\userconfig.xml" -xml projectteam.xml \
>     -xsl projectteam2fo.xsl -pdf projectteam.pdf -d
>   but no more clues appear, snif!

Please can you provide the command line output, so list members can 
evaluate the error?

> 
>   BTW, can you tell me what "IIC" means?

IIC = If I'm Correct

> 
> Thank you for your concern.

Thanks,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Hi,

> Please can you provide the command line output, so list members can 
> evaluate the error?
This is exactly the same output as the one of one of the previous posts.
Here is it:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] Failed to read a font metrics file: Invalid font metrics file: null
(spec must not be null)
[INFO] [1]
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[INFO] Parsing of document complete, stopping renderer 

> IIC = If I'm Correct
Oook, thank you for the precision.

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18848495.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Thank you again for your answer.

> Awfully weird, though.
Yes...

About the double quotes
-----------------------
  You are right, if I copy the following string as an URL in my browser,
  file:///C:\"Program Files"\fop\fonts_lea,
  the directory is not found.

  Whereas if I use file:///C:\Program Files\fop\fonts_lea
  it is escaped to file:///C:\Program%20Files\fop\fonts_lea
  and the directory is properly found.

  So I deleted the double quotes, thanks.

About the trailing backslash
----------------------------
  I added one.
  This is now what it looks like:
  <value>file:///C:\Program Files\fop\fonts_lea\</value>

  Unfortunately, it is still failing with the same error message.

Fop -d command line option
--------------------------
  So, I tried:
  # fop -c "C:\Program Files\fop\conf\userconfig.xml" -xml projectteam.xml \
    -xsl projectteam2fo.xsl -pdf projectteam.pdf -d
  but no more clues appear, snif!

  BTW, can you tell me what "IIC" means?

Thank you for your concern.

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847106.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 6, 2008, at 00:06, lmhelp wrote:

>
> Hi,
> Thank you for your answer.
>
>> That's a very --original way to specify a pathname containing a  
>> space.
>> I don't think I've ever seen that before. Does Windows even accept  
>> it?
> I do not know if you are joking or not...

I was --and then I wasn't. I must admit, the feeling was mutual.

> but Windows unfortunately does.

Nice to know. Awfully weird, though.

>>
>> If you remove the quotes, it should work fine.
> It doesn't.
> I have even tried with:
> <value>file:///C:\Progra~1\fop\fonts_lea</value>
> this is not better.

There really is no reason to work around the space. When the URL is  
parsed from the string, it will normally be escaped to '%20' anyway  
(as will the double quotes be escaped to '%22', so the original 'URI'  
would come to look like: file:///c:\%22Program%20Files%22\fop\fop_lea')

> Any other ideas?

Can you try running FOP with the '-d' command-line option, and see if  
any more clues appear? IIC, it should then also tell you more about / 
why/ the font cannot be found...

Maybe it's the missing trailing backslash, which, strictly speaking,  
makes your fontBaseDir 'c:\program files\fop'. I know that the more  
recent versions of FOP compensate for this, but I don't remember if  
0.20.5 already did.


HTH!

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Just a little thing: apparently there is a problem with a so called "spec"
parameter
which is null while it should not be.
Thank you for your help.
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18841042.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by lmhelp <lm...@wanadoo.fr>.
Hi,
Thank you for your answer.

> That's a very --original way to specify a pathname containing a space.
> I don't think I've ever seen that before. Does Windows even accept it?
I do not know if you are joking or not but Windows unfortunately does.

> If you remove the quotes, it should work fine.
It doesn't.
I have even tried with:
<value>file:///C:\Progra~1\fop\fonts_lea</value>
this is not better.

Any other ideas?

--
Lmhelp
-- 
View this message in context: http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18840886.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - FONTS - expl. verdana

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 5, 2008, at 20:03, lmhelp wrote:

Hi

> Thank you for reading my post.
> Let me tell you what my problem is.
> Let's consider the following files.

<snip />
>
> I then edited the following file: C:\Program Files\fop\conf 
> \userconfig.xml
> Its contents are:
>
> <configuration>
>   <entry>
>     <key>fontBaseDir</key>
>     <value>file:///C:\"Program Files"\fop\fonts_lea</value>

That's a very --original way to specify a pathname containing a space.
I don't think I've ever seen that before. Does Windows even accept it?

If you remove the quotes, it should work fine.

HTH!

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org