Index: test/java/org/apache/fop/layoutengine/LayoutEngineTester.java
===================================================================
--- test/java/org/apache/fop/layoutengine/LayoutEngineTester.java (révision 356368)
+++ test/java/org/apache/fop/layoutengine/LayoutEngineTester.java (copie de travail)
@@ -125,6 +125,8 @@
//Setup FOP for area tree rendering
FOUserAgent ua = new FOUserAgent();
ua.setBaseURL(testFile.getParentFile().toURL().toString());
+ File fontCfgFile = new File("conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
XMLRenderer atrenderer = new XMLRenderer();
atrenderer.setUserAgent(ua);
atrenderer.setTransformerHandler(athandler);
Index: test/java/org/apache/fop/threading/FOProcessorImpl.java
===================================================================
--- test/java/org/apache/fop/threading/FOProcessorImpl.java (révision 356368)
+++ test/java/org/apache/fop/threading/FOProcessorImpl.java (copie de travail)
@@ -18,6 +18,7 @@
package org.apache.fop.threading;
+import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
@@ -35,6 +36,7 @@
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.MimeConstants;
@@ -84,7 +86,10 @@
public void process(InputStream in, Templates templates, OutputStream out)
throws org.apache.fop.apps.FOPException, java.io.IOException {
- Fop fop = new Fop(MimeConstants.MIME_PDF);
+ FOUserAgent ua = new FOUserAgent();
+ File fontCfgFile = new File(baseDir, "conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
+ Fop fop = new Fop(MimeConstants.MIME_PDF, ua);
fop.setOutputStream(out);
try {
Index: test/java/org/apache/fop/BasicDriverTestCase.java
===================================================================
--- test/java/org/apache/fop/BasicDriverTestCase.java (révision 356368)
+++ test/java/org/apache/fop/BasicDriverTestCase.java (copie de travail)
@@ -28,6 +28,7 @@
import javax.xml.transform.stream.StreamSource;
import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.MimeConstants;
import org.apache.fop.cli.InputHandler;
@@ -52,7 +53,10 @@
public void testFO2PDFWithJAXP() throws Exception {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
- Fop fop = new Fop(MimeConstants.MIME_PDF);
+ FOUserAgent ua = new FOUserAgent();
+ File fontCfgFile = new File(getBaseDir(), "conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
+ Fop fop = new Fop(MimeConstants.MIME_PDF, ua);
fop.setOutputStream(baout);
TransformerFactory factory = TransformerFactory.newInstance();
@@ -71,7 +75,10 @@
public void testFO2PSWithJAXP() throws Exception {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
- Fop fop = new Fop(MimeConstants.MIME_POSTSCRIPT);
+ FOUserAgent ua = new FOUserAgent();
+ File fontCfgFile = new File(getBaseDir(), "conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
+ Fop fop = new Fop(MimeConstants.MIME_POSTSCRIPT, ua);
fop.setOutputStream(baout);
TransformerFactory factory = TransformerFactory.newInstance();
@@ -90,7 +97,10 @@
public void testFO2RTFWithJAXP() throws Exception {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
- Fop fop = new Fop(MimeConstants.MIME_RTF);
+ FOUserAgent ua = new FOUserAgent();
+ File fontCfgFile = new File(getBaseDir(), "conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
+ Fop fop = new Fop(MimeConstants.MIME_RTF, ua);
fop.setOutputStream(baout);
TransformerFactory factory = TransformerFactory.newInstance();
@@ -110,7 +120,10 @@
File xmlFile = new File(getBaseDir(), "test/xml/1.xml");
File xsltFile = new File(getBaseDir(), "test/xsl/doc.xsl");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
- Fop fop = new Fop(MimeConstants.MIME_PDF);
+ FOUserAgent ua = new FOUserAgent();
+ File fontCfgFile = new File(getBaseDir(), "conf/fonts.xconf");
+ ua.setFontCfgURL(fontCfgFile.toURL());
+ Fop fop = new Fop(MimeConstants.MIME_PDF, ua);
fop.setOutputStream(baout);
InputHandler handler = new InputHandler(xmlFile, xsltFile, null);
Index: conf/fop.xconf
===================================================================
--- conf/fop.xconf (révision 356368)
+++ conf/fop.xconf (copie de travail)
@@ -16,6 +16,9 @@
.
+
+ /path/to/Fop/conf/fonts.xconf
72
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
@@ -385,6 +315,7 @@
+
@@ -469,6 +401,7 @@
+
-
+
@@ -820,7 +754,7 @@
-
+