← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 247: Altered VN fop-cust.xsl to deal with Vietnamese font issues. Added DejaVu font family. Fonts are ...

 

------------------------------------------------------------
revno: 247
committer: jason <jason@jason-win7>
branch nick: dhis2-docbook-docs
timestamp: Mon 2011-01-17 10:55:47 +0200
message:
  Altered VN fop-cust.xsl to deal with Vietnamese font issues. Added DejaVu font family. Fonts are embedded now in VN PDFs.
added:
  src/fonts/
  src/fonts/DejaVuSans-Bold.ttf
  src/fonts/DejaVuSans.ttf
  src/fonts/DejaVuSansMono-Bold.ttf
  src/fonts/DejaVuSansMono.ttf
  src/fonts/DejaVuSerif-Italic.ttf
  src/fonts/LICENSE
modified:
  pom.xml
  src/docbkx/vn/resources/xsl/fop-cust.xsl


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'pom.xml'
--- pom.xml	2011-01-14 15:51:40 +0000
+++ pom.xml	2011-01-17 08:55:47 +0000
@@ -20,8 +20,7 @@
         <version>2.0.11</version> 
         <configuration>
           <xincludeSupported>true</xincludeSupported>
-        </configuration>
-
+		 </configuration>
         <executions>
           <execution>
             <id>chunked-html-docs-en</id>
@@ -194,6 +193,16 @@
               <goal>generate-pdf</goal>
             </goals>
             <configuration>
+			<bodyFontFamily>DejaVu Sans</bodyFontFamily>
+			<fonts>
+				<font>
+					<name>DejaVu Sans</name>
+						<style>normal</style>
+						<weight>normal</weight>
+						<embedFile>${project.basedir}/src/fonts/DejaVuSans.ttf</embedFile>
+						<metricsFile>${project.basedir}/target/fonts/DejaVuSans-metrics.xml</metricsFile>
+				</font>
+			  </fonts>
               <argLine>-Xmx1024m</argLine>
               <foCustomization>${docbook.source}/vn/resources/xsl/fop-cust.xsl</foCustomization>
               <doubleSided>1</doubleSided>
@@ -239,6 +248,21 @@
           </dependency>
         </dependencies>
       </plugin>
+	  <plugin>
+	  <groupId>com.agilejava.docbkx</groupId>
+        <artifactId>docbkx-fop-support</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <ansi>false</ansi>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
 
     </plugins>
   </build>

=== modified file 'src/docbkx/vn/resources/xsl/fop-cust.xsl'
--- src/docbkx/vn/resources/xsl/fop-cust.xsl	2010-06-07 06:41:44 +0000
+++ src/docbkx/vn/resources/xsl/fop-cust.xsl	2011-01-17 08:55:47 +0000
@@ -61,24 +61,24 @@
 			    <fo:block>
                                   <xsl:value-of select="bookinfo/title" /> 
                               </fo:block>
-                            <fo:block font-family="Helvetica" font-size="14pt">
+                            <fo:block font-family="DejaVu Sans" font-size="14pt">
                                 <xsl:text>The Complete Guide</xsl:text>  
                             </fo:block>
-			    <fo:block font-family="Helvetica" font-size="12pt">
+			    <fo:block font-family="DejaVu Sans" font-size="12pt">
                                 <xsl:text>Version </xsl:text><xsl:value-of select="bookinfo/releaseinfo"/>  
                             </fo:block>
                         </fo:table-cell>
                     </fo:table-row>
                     <fo:table-row>
                         <fo:table-cell text-align="center">
-                            <fo:block font-family="Helvetica" font-size="12pt">
+                            <fo:block font-family="DejaVu Sans" font-size="12pt">
                                 <xsl:value-of select="book/bookinfo/pubdate"/>
                             </fo:block>
                         </fo:table-cell>
                     </fo:table-row>
                     <fo:table-row>
                         <fo:table-cell text-align="center">
-                            <fo:block font-family="Helvetica" font-size="10pt" padding-before="80mm">
+                            <fo:block font-family="DejaVu Sans" font-size="10pt" padding-before="80mm">
                                 <xsl:text>Copyright &copyright; 2006-2010 </xsl:text>
                                 <xsl:for-each select="book/bookinfo/authorgroup/author">
                                     <xsl:if test="position() > 1">
@@ -89,7 +89,7 @@
                                     <xsl:value-of select="surname"/>
                                 </xsl:for-each>
                             </fo:block>
-                            <fo:block font-family="Helvetica" font-size="9pt" padding="1mm">
+                            <fo:block font-family="DejaVu Sans" font-size="9pt" padding="1mm">
                                 <xsl:value-of select="book/bookinfo/legalnotice"/>  
                             </fo:block>
                         </fo:table-cell>
@@ -113,17 +113,10 @@
 
     <!-- More space in the center header for long text -->
     <xsl:attribute-set name="header.content.properties">
-        <xsl:attribute name="font-family">Helvetica</xsl:attribute>
+        <xsl:attribute name="font-family">DejaVu Sans</xsl:attribute>
         <xsl:attribute name="font-size">9pt</xsl:attribute>
-		
-<!--
-        <xsl:attribute name="font-family">
-            <xsl:value-of select="$body.fontset"/>
-        </xsl:attribute>
-
         <xsl:attribute name="margin-left">-5em</xsl:attribute>
         <xsl:attribute name="margin-right">-5em</xsl:attribute>
--->
     </xsl:attribute-set>
 
 
@@ -234,7 +227,7 @@
                       Custom Footer
     ################################################### -->  
     <xsl:attribute-set name="footer.content.properties">
-        <xsl:attribute name="font-family">Helvetica</xsl:attribute>
+        <xsl:attribute name="font-family">DejaVu Sans</xsl:attribute>
         <xsl:attribute name="font-size">9pt</xsl:attribute>
     </xsl:attribute-set>
    
@@ -402,11 +395,11 @@
     <xsl:param name="hyphenate">false</xsl:param>
 
     <!-- Default Font size -->
-	<xsl:param name="body.font.family">Times-Roman</xsl:param>
+	<xsl:param name="body.font.family">DejaVu Sans</xsl:param>
     <xsl:param name="body.font.master">10</xsl:param>
     <xsl:param name="body.font.small">9</xsl:param>
-	<xsl:param name="symbol.font.family">Times-Roman</xsl:param>
-
+	<xsl:param name="symbol.font.family">DejaVu Sans</xsl:param>
+	<xsl:param name="title.font.family">DejaVu Sans</xsl:param>
 
     <!-- Line height in body text -->
     <xsl:param name="line-height">1.3</xsl:param>
@@ -462,7 +455,7 @@
 <!--###################################################
                          Titles
     ################################################### -->   
-    
+   
     <!-- Chapter title size -->
     <xsl:attribute-set name="chapter.titlepage.recto.style">
         <xsl:attribute name="text-align">left</xsl:attribute>
@@ -484,7 +477,8 @@
             </fo:block>
     </xsl:template>
     
-    <!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->    
+    <!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->   
+
     <xsl:attribute-set name="section.title.level1.properties">
         <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
         <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>

=== added directory 'src/fonts'
=== added file 'src/fonts/DejaVuSans-Bold.ttf'
Binary files src/fonts/DejaVuSans-Bold.ttf	1970-01-01 00:00:00 +0000 and src/fonts/DejaVuSans-Bold.ttf	2011-01-17 08:55:47 +0000 differ
=== added file 'src/fonts/DejaVuSans.ttf'
Binary files src/fonts/DejaVuSans.ttf	1970-01-01 00:00:00 +0000 and src/fonts/DejaVuSans.ttf	2011-01-17 08:55:47 +0000 differ
=== added file 'src/fonts/DejaVuSansMono-Bold.ttf'
Binary files src/fonts/DejaVuSansMono-Bold.ttf	1970-01-01 00:00:00 +0000 and src/fonts/DejaVuSansMono-Bold.ttf	2011-01-17 08:55:47 +0000 differ
=== added file 'src/fonts/DejaVuSansMono.ttf'
Binary files src/fonts/DejaVuSansMono.ttf	1970-01-01 00:00:00 +0000 and src/fonts/DejaVuSansMono.ttf	2011-01-17 08:55:47 +0000 differ
=== added file 'src/fonts/DejaVuSerif-Italic.ttf'
Binary files src/fonts/DejaVuSerif-Italic.ttf	1970-01-01 00:00:00 +0000 and src/fonts/DejaVuSerif-Italic.ttf	2011-01-17 08:55:47 +0000 differ
=== added file 'src/fonts/LICENSE'
--- src/fonts/LICENSE	1970-01-01 00:00:00 +0000
+++ src/fonts/LICENSE	2011-01-17 08:55:47 +0000
@@ -0,0 +1,99 @@
+Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
+Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
+
+Bitstream Vera Fonts Copyright
+------------------------------
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
+a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute the
+Font Software, including without limitation the rights to use, copy, merge,
+publish, distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to the
+following conditions:
+
+The above copyright and trademark notices and this permission notice shall
+be included in all copies of one or more of the Font Software typefaces.
+
+The Font Software may be modified, altered, or added to, and in particular
+the designs of glyphs or characters in the Fonts may be modified and
+additional glyphs or characters may be added to the Fonts, only if the fonts
+are renamed to names not containing either the words "Bitstream" or the word
+"Vera".
+
+This License becomes null and void to the extent applicable to Fonts or Font
+Software that has been modified and is distributed under the "Bitstream
+Vera" names.
+
+The Font Software may be sold as part of a larger software package but no
+copy of one or more of the Font Software typefaces may be sold by itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
+TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
+FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
+FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font Software
+without prior written authorization from the Gnome Foundation or Bitstream
+Inc., respectively. For further information, contact: fonts at gnome dot
+org. 
+
+Arev Fonts Copyright
+------------------------------
+
+Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and
+associated documentation files (the "Font Software"), to reproduce
+and distribute the modifications to the Bitstream Vera Font Software,
+including without limitation the rights to use, copy, merge, publish,
+distribute, and/or sell copies of the Font Software, and to permit
+persons to whom the Font Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Tavmjong Bah" or the word "Arev".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the 
+"Tavmjong Bah Arev" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the name of Tavmjong Bah shall not
+be used in advertising or otherwise to promote the sale, use or other
+dealings in this Font Software without prior written authorization
+from Tavmjong Bah. For further information, contact: tavmjong @ free
+. fr.
+
+$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $