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 Varadharajan Sethuraman <va...@yahoo.com> on 2004/04/19 07:41:14 UTC

Issue with font-family using xsl-attribue

Hi All,
 
I have some problem with FOP 0.20.5, respective xml and xsl file mention below.
I am trying to write the xml content to pdf file. In the xml file contains font information also as mention below. 
 
I am trying to set the font name dynamically using <xsl-attribute> but font-name is not setting properly but font-style (ex. bold) is reflecting correctly. And text-transform attribute of fo:block also not reflecting.
 
 
if you have any work around for this issue pls let me know.
 
sample xml content
-----------------------------
    <name>John Doe</name>
    <function>lead</function>
    <email>jon.doe@killerapp.fun</email>
    <font-name>Tahoma</font-name>
    <font-style>bold</font-style>


sample xsl and xsl-fo content
------------------------------------------
      <fo:block font-size="11pt" text-transform="uppercase" text-decoration="underline">
       <xsl:attribute name="font-family"><xsl:value-of select="font-name"/></xsl:attribute>
       <xsl:attribute name="font-weight"><xsl:value-of select="font-style"/></xsl:attribute>
       <xsl:value-of select="function"/>
      </fo:block>

Regards
Varadharajan S
 

		
---------------------------------
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�

Re: Issue with font-family using xsl-attribue

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

<snip/>

> *I am trying to set the font name dynamically using <xsl-attribute> but 
> font-name is not setting properly but font-style (ex. bold) is 
> reflecting correctly. And /text-transform/ attribute of fo:block also 
> not reflecting.*

text-transform attribute is not implemented by FOP 0.20.5. See the compliance 
page on the website:

http://xml.apache.org/fop/compliance.html#fo-property-text-transform

>     <*font-name*>Tahoma</*font-name*>

Tahoma is not one of the standard 14 fonts that comes with FOP. Have you 
created Font metrics file for Tahoma and added entries to a user configuration 
file that references the metrics files? See the website for more information 
on working with custom fonts:

http://xml.apache.org/fop/fonts.html#custom

Chris



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