manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1237018 - in /incubator/lcf/trunk: LICENSE.txt lib/avalon-framework-4.2.0.jar lib/fop.jar lib/xmlgraphics-commons-1.4.jar site/build.xml site/forrest.properties.xml site/src/documentation/resources/fonts/config.xml
Date Sat, 28 Jan 2012 08:19:12 GMT
Author: kwright
Date: Sat Jan 28 08:19:11 2012
New Revision: 1237018

URL: http://svn.apache.org/viewvc?rev=1237018&view=rev
Log:
Part of CONNECTORS-387.  Build, register, and use IPA fonts for rendering Japanese PDFs. 
Doesn't yet work entirely, but at least the font metrics files get built and there's a forrest.properties.xml
file people can work with.

Added:
    incubator/lcf/trunk/lib/avalon-framework-4.2.0.jar   (with props)
    incubator/lcf/trunk/lib/fop.jar   (with props)
    incubator/lcf/trunk/lib/xmlgraphics-commons-1.4.jar   (with props)
    incubator/lcf/trunk/site/forrest.properties.xml   (with props)
Modified:
    incubator/lcf/trunk/LICENSE.txt
    incubator/lcf/trunk/site/build.xml
    incubator/lcf/trunk/site/src/documentation/resources/fonts/config.xml

Modified: incubator/lcf/trunk/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/LICENSE.txt?rev=1237018&r1=1237017&r2=1237018&view=diff
==============================================================================
--- incubator/lcf/trunk/LICENSE.txt (original)
+++ incubator/lcf/trunk/LICENSE.txt Sat Jan 28 08:19:11 2012
@@ -188,6 +188,9 @@ including, but not limited to:
   - Apache Jetty
   - Apache Chemistry
   - Apache Velocity
+  - Apache Avalon
+  - Apache FOP
+  - Apache XMLGraphics Commons
 
 This product includes code from: http://www.json.org
 License: JSON license (http://www.json.org/license.html)

Added: incubator/lcf/trunk/lib/avalon-framework-4.2.0.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/lib/avalon-framework-4.2.0.jar?rev=1237018&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/trunk/lib/avalon-framework-4.2.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lcf/trunk/lib/fop.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/lib/fop.jar?rev=1237018&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/trunk/lib/fop.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lcf/trunk/lib/xmlgraphics-commons-1.4.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/lib/xmlgraphics-commons-1.4.jar?rev=1237018&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/trunk/lib/xmlgraphics-commons-1.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/lcf/trunk/site/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/build.xml?rev=1237018&r1=1237017&r2=1237018&view=diff
==============================================================================
--- incubator/lcf/trunk/site/build.xml (original)
+++ incubator/lcf/trunk/site/build.xml Sat Jan 28 08:19:11 2012
@@ -19,9 +19,60 @@
 
     <target name="clean">
         <delete dir="build"/>
+        <delete dir="font-build"/>
+    </target>
+
+    <target name="calculate-dejavu-condition">
+        <available file="fonts/dejavu-fonts-ttf-2.33.zip" property="dejavuAvailable"/>
+    </target>
+
+    <target name="dejavu-check" depends="calculate-dejavu-condition" unless="dejavuAvailable">
+        <echo message="Dejavu fonts cannot be built without dejavu-fonts-ttf-2.33.zip"/>
+    </target>
+
+    <target name="calculate-ipa-condition">
+        <available file="fonts/IPAGTTC00303.zip" property="ipaAvailable"/>
+    </target>
+
+    <target name="ipa-check" depends="calculate-ipa-condition" unless="ipaAvailable">
+        <echo message="IPA fonts cannot be built without IPAGTTC00303.zip"/>
+    </target>
+
+    <target name="build-ipa-fonts" depends="ipa-check" if="ipaAvailable">
+        <mkdir dir="font-build/ipa-fonts"/>
+        <unzip src="fonts/IPAGTTC00303.zip" dest="font-build/ipa-fonts"/>
+        <java classname="org.apache.fop.fonts.apps.TTFReader" fork="true">
+            <classpath>
+                <fileset dir="../lib">
+                    <include name="fop*.jar"/>
+                    <include name="avalon*.jar"/>
+                    <include name="commons-io*.jar"/>
+                    <include name="commons-logging*.jar"/>
+                </fileset>
+            </classpath>
+            <arg value="-ttcname"/>
+            <arg value="IPAPGothic"/>
+            <arg value="font-build/ipa-fonts/IPAGTTC00303/ipag.ttc"/>
+            <arg value="font-build/ipapgothic.xml"/>
+        </java>
+        <java classname="org.apache.fop.fonts.apps.TTFReader" fork="true">
+            <classpath>
+                <fileset dir="../lib">
+                    <include name="fop*.jar"/>
+                    <include name="avalon*.jar"/>
+                    <include name="commons-io*.jar"/>
+                    <include name="commons-logging*.jar"/>
+                </fileset>
+            </classpath>
+            <arg value="-ttcname"/>
+            <arg value="IPAGothic"/>
+            <arg value="font-build/ipa-fonts/IPAGTTC00303/ipag.ttc"/>
+            <arg value="font-build/ipagothic.xml"/>
+        </java>
+
     </target>
     
-    <target name="dist">
+    <target name="dist" depends="build-ipa-fonts,ipa-check" if="ipaAvailable">
         <exec executable="cmd.exe" dir="." searchpath="true" failonerror="true" osfamily="windows">
             <arg line="/c forrest.bat site"/>
             <env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF8"/>
@@ -32,6 +83,21 @@
         </exec>
     </target>
     
+    <target name="download-dejavu-fonts">
+      <mkdir dir="fonts"/>
+      <get src="http://downloads.sourceforge.net/project/dejavu/dejavu/2.33/dejavu-fonts-ttf-2.33.zip?r=&amp;ts=1327734867&amp;use_mirror=cdnetworks-us-2"
dest="fonts"/>
+    </target>
+    
+    <target name="download-ipa-fonts">
+      <mkdir dir="fonts"/>
+      <!-- http://ossipedia.ipa.go.jp/ipafont/download.html?ruleagreement=%E5%90%8C%E6%84%8F%E3%81%99%E3%82%8B%2FAccept
-->
+      <!-- get src="http://ossipedia.ipa.go.jp/ipafont/IPAGTTC00303.php" dest="fonts/IPAGTTC00303.zip"/
-->
+      <get src="http://info.openlab.ipa.go.jp/ipafont/fontdata/IPAGTTC00303.zip" dest="fonts"/>
+    </target>
+    
+    <target name="download-dependencies" depends="download-dejavu-fonts,download-ipa-fonts">
+    </target>
+    
     <target name="all" depends="dist"/>
     
 </project>

Added: incubator/lcf/trunk/site/forrest.properties.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/forrest.properties.xml?rev=1237018&view=auto
==============================================================================
--- incubator/lcf/trunk/site/forrest.properties.xml (added)
+++ incubator/lcf/trunk/site/forrest.properties.xml Sat Jan 28 08:19:11 2012
@@ -0,0 +1,31 @@
+<?xml version='1.0'?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<properties>
+  <property name="output.pdf.fontFamily.serif" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.sansSerif" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.monospace" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.arial" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.TimesNewRoman" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.Courier" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.arialMT" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.arial-BoldMT" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.arial-ItalicMT" value="IPAPGothic"/>
+  <property name="output.pdf.fontFamily.TimesNewRomanPSMT" value="IPAPGothic"/>
+</properties>
\ No newline at end of file

Propchange: incubator/lcf/trunk/site/forrest.properties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/site/forrest.properties.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/lcf/trunk/site/src/documentation/resources/fonts/config.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/src/documentation/resources/fonts/config.xml?rev=1237018&r1=1237017&r2=1237018&view=diff
==============================================================================
--- incubator/lcf/trunk/site/src/documentation/resources/fonts/config.xml (original)
+++ incubator/lcf/trunk/site/src/documentation/resources/fonts/config.xml Sat Jan 28 08:19:11
2012
@@ -16,11 +16,63 @@
 -->
 
 <fop>
- <renderers>
-   <renderer mime="application/pdf">
-     <fonts>
-       <auto-detect/>
-     </fonts>
-   </renderer>
- </renderers>
+  <renderers>
+    <renderer mime="application/pdf">
+      <fonts>
+        <auto-detect/>
+        
+        <!-- IPAGothic -->
+        <font metrics-file="font-build/ipagothic.xml" kerning="yes" embed-url="file://font-build/ipa-fonts/IPAGTTC00303/ipag.ttc">
+          <font-triplet name="IPAGothic" style="normal" weight="normal"/>
+          <font-triplet name="IPAGothic" style="normal" weight="bold"/>
+          <font-triplet name="IPAGothic" style="normal" weight="100"/>
+          <font-triplet name="IPAGothic" style="normal" weight="200"/>
+          <font-triplet name="IPAGothic" style="normal" weight="300"/>
+          <font-triplet name="IPAGothic" style="normal" weight="400"/>
+          <font-triplet name="IPAGothic" style="normal" weight="500"/>
+          <font-triplet name="IPAGothic" style="normal" weight="600"/>
+          <font-triplet name="IPAGothic" style="normal" weight="700"/>
+          <font-triplet name="IPAGothic" style="normal" weight="800"/>
+          <font-triplet name="IPAGothic" style="normal" weight="900"/>
+          <font-triplet name="IPAGothic" style="italic" weight="normal"/>
+          <font-triplet name="IPAGothic" style="italic" weight="bold"/>
+          <font-triplet name="IPAGothic" style="italic" weight="100"/>
+          <font-triplet name="IPAGothic" style="italic" weight="200"/>
+          <font-triplet name="IPAGothic" style="italic" weight="300"/>
+          <font-triplet name="IPAGothic" style="italic" weight="400"/>
+          <font-triplet name="IPAGothic" style="italic" weight="500"/>
+          <font-triplet name="IPAGothic" style="italic" weight="600"/>
+          <font-triplet name="IPAGothic" style="italic" weight="700"/>
+          <font-triplet name="IPAGothic" style="italic" weight="800"/>
+          <font-triplet name="IPAGothic" style="italic" weight="900"/>
+        </font>
+
+        <!-- IPAPGothic -->
+        <font metrics-file="font-build/ipapgothic.xml" kerning="yes" embed-url="file://font-build/ipa-fonts/IPAGTTC00303/ipag.ttc">
+          <font-triplet name="IPAPGothic" style="normal" weight="normal"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="bold"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="100"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="200"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="300"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="400"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="500"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="600"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="700"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="800"/>
+          <font-triplet name="IPAPGothic" style="normal" weight="900"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="normal"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="bold"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="100"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="200"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="300"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="400"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="500"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="600"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="700"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="800"/>
+          <font-triplet name="IPAPGothic" style="italic" weight="900"/>
+        </font>
+      </fonts>
+    </renderer>
+  </renderers>
 </fop>
\ No newline at end of file



Mime
View raw message