Ok, I use this and it works.

I use Tomcat 4.0.1, JDK 1.3.1, Fop 0.20.2

Do you try to use it from command line? It works?
And when you run servlet it don't works? In this case, I think, there is an
error in servlet when you specify the userconfig.xml file.

Good luck :-)

------- xsl file
<xsl:template name="caption">
        <fo:block font-size="18pt" line-height="20pt" font-family="Verdana"
                space-after.optimum="1pt" color="black" border-bottom="solid
2pt black"
                text-align="start" padding-top="0pt" font-weight="bold">
                <xsl:value-of select="caption"/>
        </fo:block>
</xsl:template>

------------ result 
<fo:block font-size="18pt" line-height="20pt" font-family="Verdana"
space-after.optimum="1pt" color="black" border-bottom="solid 2pt black"
text-align="start" padding-top="0pt" font-weight="bold">
 SOME TEXT IN VERDANA FONT HERE
</fo:block>

------ this is from userconfig.xml
<fonts>
<!-- VERDANA -->
 <font metrics-file="c:\xmllib\fonts\verdana.ttf.xml" kerning="yes"
embed-file="c:\xmllib\fonts\verdana.ttf">
    <font-triplet name="Verdana" style="normal" weight="normal"/>
 </font>
 <font metrics-file="c:\xmllib\fonts\verdanab.ttf.xml" kerning="yes"
embed-file="c:\xmllib\fonts\verdanab.ttf">
    <font-triplet name="Verdana" style="normal" weight="bold"/>
 </font>
 <font metrics-file="c:\xmllib\fonts\verdanai.ttf.xml" kerning="yes"
embed-file="c:\xmllib\fonts\verdanai.ttf">
    <font-triplet name="Verdana" style="italic" weight="normal"/>
 </font>
 <font metrics-file="c:\xmllib\fonts\verdanaz.ttf.xml" kerning="yes"
embed-file="c:\xmllib\fonts\verdanaz.ttf">
    <font-triplet name="Verdana" style="italic" weight="bold"/>
 </font>
</fonts>


-----Original Message-----
From: Raúl Carazo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 27, 2001 6:24 PM
To: [EMAIL PROTECTED]
Subject: RE: Fonts


    Thanks to all of you, really!!

    But I'm not using the example. In fact, if I try to use it, everything
works, but when I move it to my servlet...
It's really strange, because if I set any font, it appears with Times New
Roman (the default one), but if I don't set it, it appears with Arial!!!

    Anyway, thank you!

    Salve

    P.S. I send you the right xsl:

    <xsl:attribute-set name="style">
      <xsl:attribute name="font-size">10pt</xsl:attribute>
    </xsl:attribute-set>

    With this style, the font is Arial

    If I set this one:

    <xsl:attribute-set name="style">
      <xsl:attribute name="font-size">10pt</xsl:attribute>
      <xsl:attribute name="font-family">Verdana</xsl:attribute>
      <xsl:attribute name="font-style"/>
    </xsl:attribute-set>

(with Verdana or any other font), the font is Times New Roman.

And if I set:

    <xsl:attribute-set name="style">
      <xsl:attribute name="font-size">10pt</xsl:attribute>
      <xsl:attribute name="font-family">Verdana</xsl:attribute>
    </xsl:attribute-set>

there is an exception.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to