[FOray-commit] SF.net SVN: foray: [8243] trunk/foray/foray-font
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-09-29 22:05:01
|
Revision: 8243
http://svn.sourceforge.net/foray/?rev=8243&view=rev
Author: victormote
Date: 2006-09-29 15:04:52 -0700 (Fri, 29 Sep 2006)
Log Message:
-----------
Add logic allowing the AFM files to be serialized and assembled in a jar file.
Modified Paths:
--------------
trunk/foray/foray-font/scripts/build.xml
trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java
Modified: trunk/foray/foray-font/scripts/build.xml
===================================================================
--- trunk/foray/foray-font/scripts/build.xml 2006-09-29 03:43:38 UTC (rev 8242)
+++ trunk/foray/foray-font/scripts/build.xml 2006-09-29 22:04:52 UTC (rev 8243)
@@ -17,11 +17,17 @@
<property name="jar.file"
location="${build.dir}/${name.lowercase}-${module}-${version}.jar"/>
+ <property name="resource.dir" value="${module.dir}/resource"/>
+ <property name="base14.source" value="${resource.dir}/base-14"/>
+ <property name="resources.build"
+ location="${build.dir}/resource/org/foray/font/resource/base-14"/>
+
<path id="libs-build-classpath">
<fileset dir="${axsl.build}">
<include name="**/axsl*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
+ <include name="avalon-framework*.jar"/>
<include name="xercesImpl*.jar"/>
<include name="axsl*.jar"/>
<include name="commons-logging.jar"/>
@@ -50,6 +56,46 @@
<mkdir dir="${classes.dir}"/>
</target>
+
+ <!--
+ ==============================================================================
+ Parse and serialize the Base-14 AFM files
+ ==============================================================================
+ -->
+ <target name="resources" depends="compile"
+ description="Parse and serialize the Base-14 AFM files">
+ <mkdir dir="${resources.build}"/>
+ <path id="resources-classpath">
+ <path refid="libs-build-classpath"/>
+ <pathelement location="${classes.dir}"/>
+ </path>
+ <taskdef name="serializeMetrics"
+ classname="org.foray.font.SerializeStandardFonts"
+ classpathref="resources-classpath"/>
+ <serializeMetrics includes="*.afm"
+ sourceDir="${base14.source}"
+ targetDir="${resources.build}" />
+
+ <!-- Put the compiled font metrics objects in a jar file. -->
+ <property name="font.resource.jar.file"
+ location="${build.dir}/${name.lowercase}-${module}-${version}-rsrc.jar"/>
+ <fileset id="foray-font-resources"
+ dir="${foray.home}/${name.lowercase}-${module}/build/ant/resource">
+ <include name="**"/>
+ </fileset>
+ <jar jarfile="${font.resource.jar.file}">
+ <fileset refid="foray-font-resources"/>
+ <manifest>
+ <attribute name="Implementation-Title"
+ value="${name.lowercase}-${module}-rsrc"/>
+ <attribute name="Implementation-Version" value="${version}"/>
+ <attribute name="Implementation-Vendor"
+ value="${contact.info}"/>
+ </manifest>
+ </jar>
+ </target>
+
+
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
Modified: trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java 2006-09-29 03:43:38 UTC (rev 8242)
+++ trunk/foray/foray-font/src/java/org/foray/font/SerializeStandardFonts.java 2006-09-29 22:04:52 UTC (rev 8243)
@@ -102,7 +102,7 @@
* @param filename The input file to be processed.
*/
private void processFile(final String filename) {
- final File infile = new File(sourceDir, filename + ".xml");
+ final File infile = new File(sourceDir, filename + ".afm");
final File outfile = new File(targetDir, filename + "."
+ FOrayConstants.BINARY_SERIALIZATION_EXTENSION);
boolean startProcess = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|