<project name="fop.docbook" basedir="." default="all">
	<!--
	===========================================================================
	==
	== Apache FOP フォント定義 ビルドファイル
	==
	== 目的:日本語フォントはデフォルトで登録されていないので、
	==      フォント定義ファイルの作成などの処理を行う。
	==
	== copyright (c) exacteye.com allright reserved.
	==
	===========================================================================
	-->
	<property environment="env"/>
	<property name="font.path" value="${env.SystemRoot}/fonts"/>
	<property name="lib.dir" value="${basedir}/lib"/>
	<property name="fop.home" value="${basedir}/fop-0.20.5"/>
	<property name="fop.conf.dir" value="${fop.home}/conf"/>
	
	<path id="fop.class.path">
		<pathelement location="${fop.home}/build/fop.jar"/>
		<pathelement location="${fop.home}/lib/xercesImpl-2.2.1.jar"/>
		<pathelement location="${lib.dir}/xalan.jar"/>
		<!--
		このjar ファイルのバージョンが古かったのでFileNotExceptionが
		発生していた。
		<pathelement location="${fop.home}/lib/xalan-2.4.1.jar"/>
		-->
	</path>

	<target name="all">
		<antcall target="getMinchoFontName"/>
		<antcall target="getGothicFontName"/>
	</target>	
	<!--
	=====================================================================
	==
	== わざとエラーを出しTTCファイルに含まれるフォント名を判別する
	== 調査用
	==
	=====================================================================
	-->
	<!-- ＭＳ明朝体 -->
	<target name="getMinchoFontName">
		<echo message="-------------------------------------------------"/>
		<echo message="msmicho.ttcに含まれるフォント名の確認"/>
		<echo message="-------------------------------------------------"/>
		<java 
			classname="org.apache.fop.fonts.apps.TTFReader"
			args="${font.path}/msmincho.ttc test.xml" 
			>
			<classpath refid="fop.class.path"/>			
		</java>		
	</target>

	<!-- ＭＳゴシック体 -->
	<target name="getGothicFontName">
		<echo message="-------------------------------------------------"/>
		<echo message="msgothic.ttcに含まれるフォント名の確認"/>
		<echo message="-------------------------------------------------"/>
		<java 
			classname="org.apache.fop.fonts.apps.TTFReader"
			args="${font.path}/msgothic.ttc test.xml" 
			>
			<classpath refid="fop.class.path"/>			
		</java>		
	</target>


</project>