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 ro...@pfpc.com on 2004/11/30 17:32:47 UTC
Font style problem
Hi
I have all the fonts available in my System . But the fop does not pick up
the right font while applying.
Here is the code I have in XSLT
<xsl:template match="html:span[@style='font-family:Times']">
<fo:inline font-family="Times">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="html:span[@style='font-family:Arial']">
<fo:inline font-family="Arial">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="html:span[@style='font-family:Times']">
<fo:inline font-family="Times">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="html:span[@style='font-family:Courier New']">
<fo:inline font-family="Courier">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="html:span[@style='font-family:Serif']">
<fo:inline font-family="Serif">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="html:span[@style='font-family:Andale Sans']">
<fo:inline font-family="Andale Sans">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
The XML looks like this
.....
.....
<p>
<span style="font-family:Andale Sans">This line information has
font in Andale Sans above it.
</span>
</p>
.....
......
Is there anything wrong in the code.
What I am doing is trying to generate PDF for an XHTML content using an
XSLT.
Thanks and Regards
Rohit
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: Font style problem
Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: rohit.rastogi@pfpc.com [mailto:rohit.rastogi@pfpc.com]
>
Hi,
> I have all the fonts available in my System . But the fop does not pick up
> the right font while applying.
<snip />
> Is there anything wrong in the code.
No. You probably want to take a closer look at:
http://xml.apache.org/fop/fonts.html
HTH!
Greetz,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org