forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r692398 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-authors.ft
Date Fri, 05 Sep 2008 09:40:00 GMT
Author: sjur
Date: Fri Sep  5 02:40:00 2008
New Revision: 692398

URL: http://svn.apache.org/viewvc?rev=692398&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.

Also changed some metrics from pt to em/relative, as in the skins-based document-to-fo.xsl.

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

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-authors.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-authors.ft?rev=692398&r1=692397&r2=692398&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-authors.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/fo/content-authors.ft
Fri Sep  5 02:40:00 2008
@@ -35,15 +35,26 @@
       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="authorsFontFamily">
+        <xsl:choose>
+          <xsl:when test="$defaultVariables/*/*[@name='output.pdf.fontFamily.authorsFontFamily']">
+            <xsl:value-of select="$defaultVariables/*/*[@name='output.pdf.fontFamily.authorsFontFamily']/@value"/>
+          </xsl:when>
+          <xsl:otherwise><xsl:value-of select="$sans-serif"/></xsl:otherwise>
+        </xsl:choose>
+      </xsl:param>
       <xsl:include href="lm://pdf.transform.helper.pageBreaks" />
       <xsl:template match="/">
         <forrest:content>
           <forrest:part xpath="/fo/xsl-region-body/title">
             <xsl:if test="//div[@class='author']">
               <fo:block
-                space-before="20pt"
+                space-before="2em"
+                font-family="{$authorsFontFamily}"
                 font-weight="bold"
-                font-size="9pt">
+                font-size="smaller">
                 <xsl:call-template name="insertPageBreaks"/>
                 <!-- FIXME - insert i18n stuff here --> by
                 <xsl:for-each select="//div[@class='author']">



Mime
View raw message