forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r692413 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft
Date Fri, 05 Sep 2008 11:26:27 GMT
Author: sjur
Date: Fri Sep  5 04:26:26 2008
New Revision: 692413

URL: http://svn.apache.org/viewvc?rev=692413&view=rev
Log:
Bringing this contract in line with the skins-based pdf generation by adding the font-family
attribute, and at the same time adding support for user-specification of the font family.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft?rev=692413&r1=692412&r2=692413&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-title.ft
Fri Sep  5 04:26:26 2008
@@ -35,6 +35,16 @@
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:fo="http://www.w3.org/1999/XSL/Format"
       version="1.0">
+      <xsl:param name="defaultVariables" select="'test.html'"/>
+      <xsl:param name="sans-serif" select="$defaultVariables/*/*[@name='output.pdf.fontFamily.sansSerif']/@value"
/>
+      <xsl:param name="documentTitleFontFamily">
+        <xsl:choose>
+          <xsl:when test="$defaultVariables/*/*[@name='output.pdf.fontFamily.documentTitleFontFamily']">
+            <xsl:value-of select="$defaultVariables/*/*[@name='output.pdf.fontFamily.documentTitleFontFamily']/@value"/>
+          </xsl:when>
+          <xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:param>
       <xsl:template match="/">
         <forrest:content>
           <forrest:part xpath="/fo/page-sequence">
@@ -46,6 +56,7 @@
             <fo:block
                 padding-before="24pt"
                 padding-after="24pt"
+                font-family="{$documentTitleFontFamily}"
                 font-size="24pt"
                 font-weight="bold"
                 id="{generate-id()}">



Mime
View raw message