You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by sp...@apache.org on 2007/09/25 11:00:31 UTC

svn commit: r579136 [4/4] - in /xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking: ./ examples/fo/basic/ lib/ src/documentation/content/xdocs/ src/documentation/content/xdocs/0.20.5/ src/documentation/content/xdocs/0.93/ src/documentation/co...

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/FontSetup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/FontSetup.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/FontSetup.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/FontSetup.java Tue Sep 25 02:00:20 2007
@@ -139,52 +139,52 @@
         // fontInfo.addMetrics("F17", new BauerBodoniBoldItalic());
 
         /* any is treated as serif */
-        fontInfo.addFontProperties("F5", "any", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "any", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "any", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F7", "any", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F8", "any", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F8", "any", "oblique", Font.BOLD);
-
-        fontInfo.addFontProperties("F1", "sans-serif", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F2", "sans-serif", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F2", "sans-serif", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F3", "sans-serif", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F4", "sans-serif", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F4", "sans-serif", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F5", "serif", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "serif", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "serif", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F7", "serif", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F8", "serif", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F8", "serif", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F9", "monospace", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F10", "monospace", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F10", "monospace", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F11", "monospace", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F12", "monospace", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F12", "monospace", "italic", Font.BOLD);
-
-        fontInfo.addFontProperties("F1", "Helvetica", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F2", "Helvetica", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F2", "Helvetica", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F3", "Helvetica", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F4", "Helvetica", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F4", "Helvetica", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F5", "Times", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F7", "Times", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F9", "Courier", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F10", "Courier", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F10", "Courier", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F11", "Courier", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F12", "Courier", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F12", "Courier", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F13", "Symbol", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F14", "ZapfDingbats", "normal", Font.NORMAL);
+        fontInfo.addFontProperties("F5", "any", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "any", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "any", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F7", "any", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "any", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "any", "oblique", Font.WEIGHT_BOLD);
+
+        fontInfo.addFontProperties("F1", "sans-serif", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F2", "sans-serif", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F2", "sans-serif", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F3", "sans-serif", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F4", "sans-serif", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F4", "sans-serif", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F5", "serif", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "serif", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "serif", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F7", "serif", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "serif", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "serif", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F9", "monospace", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F10", "monospace", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F10", "monospace", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F11", "monospace", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F12", "monospace", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F12", "monospace", "italic", Font.WEIGHT_BOLD);
+
+        fontInfo.addFontProperties("F1", "Helvetica", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F2", "Helvetica", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F2", "Helvetica", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F3", "Helvetica", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F4", "Helvetica", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F4", "Helvetica", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F5", "Times", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F7", "Times", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F9", "Courier", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F10", "Courier", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F10", "Courier", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F11", "Courier", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F12", "Courier", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F12", "Courier", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F13", "Symbol", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F14", "ZapfDingbats", "normal", Font.WEIGHT_NORMAL);
 
         // Custom type 1 fonts step 2/2
         // fontInfo.addFontProperties("F15", "OMEP", "normal", FontInfo.NORMAL);
@@ -192,20 +192,20 @@
         // fontInfo.addFontProperties("F17", "BauerBodoni", "italic", FontInfo.BOLD);
 
         /* for compatibility with PassiveTex */
-        fontInfo.addFontProperties("F5", "Times-Roman", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times-Roman", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times-Roman", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F7", "Times-Roman", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times-Roman", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times-Roman", "italic", Font.BOLD);
-        fontInfo.addFontProperties("F5", "Times Roman", "normal", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times Roman", "oblique", Font.NORMAL);
-        fontInfo.addFontProperties("F6", "Times Roman", "italic", Font.NORMAL);
-        fontInfo.addFontProperties("F7", "Times Roman", "normal", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times Roman", "oblique", Font.BOLD);
-        fontInfo.addFontProperties("F8", "Times Roman", "italic", Font.BOLD);
+        fontInfo.addFontProperties("F5", "Times-Roman", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times-Roman", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times-Roman", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F7", "Times-Roman", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times-Roman", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times-Roman", "italic", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F5", "Times Roman", "normal", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times Roman", "oblique", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F6", "Times Roman", "italic", Font.WEIGHT_NORMAL);
+        fontInfo.addFontProperties("F7", "Times Roman", "normal", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times Roman", "oblique", Font.WEIGHT_BOLD);
+        fontInfo.addFontProperties("F8", "Times Roman", "italic", Font.WEIGHT_BOLD);
         fontInfo.addFontProperties("F9", "Computer-Modern-Typewriter",
-                                   "normal", Font.NORMAL);
+                                   "normal", Font.WEIGHT_NORMAL);
         
         configureInstalledAWTFonts(fontInfo, graphics, LAST_PREDEFINED_FONT_NUMBER + 1);
     }
@@ -252,9 +252,9 @@
         FontMetricsMapper metric = new FontMetricsMapper(family, fontStyle, graphics);
         fontInfo.addMetrics(fontKey, metric);
         
-        int weight = Font.NORMAL;
+        int weight = Font.WEIGHT_NORMAL;
         if ((fontStyle & java.awt.Font.BOLD) != 0) {
-            weight = Font.BOLD;
+            weight = Font.WEIGHT_BOLD;
         }
         String style = "normal";
         if ((fontStyle & java.awt.Font.ITALIC) != 0) {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/Java2DRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/Java2DRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/java2d/Java2DRenderer.java Tue Sep 25 02:00:20 2007
@@ -53,10 +53,9 @@
 
 import org.w3c.dom.Document;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactoryConfigurator;
 import org.apache.fop.area.CTM;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.Trait;
@@ -73,7 +72,6 @@
 import org.apache.fop.image.FopImage;
 import org.apache.fop.image.ImageFactory;
 import org.apache.fop.image.XMLImage;
-import org.apache.fop.pdf.PDFAMode;
 import org.apache.fop.render.AbstractPathOrientedRenderer;
 import org.apache.fop.render.Graphics2DAdapter;
 import org.apache.fop.render.RendererContext;
@@ -151,19 +149,6 @@
     }
 
     /**
-     * @see org.apache.fop.render.AbstractRenderer#configure(
-     *          org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        super.configure(cfg);
-
-        String s = cfg.getChild(JAVA2D_TRANSPARENT_PAGE_BACKGROUND, true).getValue(null);
-        if (s != null) {
-            this.transparentPageBackground = "true".equalsIgnoreCase(s);
-        }
-    }
-
-    /**
      * @see org.apache.fop.render.Renderer#setUserAgent(org.apache.fop.apps.FOUserAgent)
      */
     public void setUserAgent(FOUserAgent foUserAgent) {
@@ -305,10 +290,10 @@
                             + pageHeight + ")");
 
             double scaleX = scaleFactor 
-                * (25.4 / FOUserAgent.DEFAULT_TARGET_RESOLUTION) 
+                * (25.4 / FopFactoryConfigurator.DEFAULT_TARGET_RESOLUTION) 
                 / userAgent.getTargetPixelUnitToMillimeter();
             double scaleY = scaleFactor
-                * (25.4 / FOUserAgent.DEFAULT_TARGET_RESOLUTION)
+                * (25.4 / FopFactoryConfigurator.DEFAULT_TARGET_RESOLUTION)
                 / userAgent.getTargetPixelUnitToMillimeter();
             int bitmapWidth = (int) ((pageWidth * scaleX) + 0.5);
             int bitmapHeight = (int) ((pageHeight * scaleY) + 0.5);
@@ -1021,6 +1006,10 @@
     /** @see org.apache.fop.render.AbstractPathOrientedRenderer#endTextObject() */
     protected void endTextObject() {
         //not necessary in Java2D
+    }
+
+    public void setTransparentPageBackground(boolean transparentPageBackground) {
+        this.transparentPageBackground = transparentPageBackground;
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRenderer.java Tue Sep 25 02:00:20 2007
@@ -53,8 +53,6 @@
 import org.apache.xmlgraphics.java2d.GraphicContext;
 
 // FOP
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.fop.apps.FOPException;
@@ -143,31 +141,8 @@
     public PCLRenderer() {
     }
 
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        super.configure(cfg);
-        String rendering = cfg.getChild("rendering").getValue(null);
-        if ("quality".equalsIgnoreCase(rendering)) {
-            this.qualityBeforeSpeed = true;
-        } else if ("speed".equalsIgnoreCase(rendering)) {
-            this.qualityBeforeSpeed = false;
-        } else if (rendering != null) {
-            throw new ConfigurationException(
-                    "Valid values for 'rendering' are 'quality' and 'speed'. Value found: " 
-                        + rendering);
-        }
-        String textRendering = cfg.getChild("text-rendering").getValue(null);
-        if ("bitmap".equalsIgnoreCase(textRendering)) {
-            this.allTextAsBitmaps = true;
-        } else if ("auto".equalsIgnoreCase(textRendering)) {
-            this.allTextAsBitmaps = false;
-        } else if (textRendering != null) {
-            throw new ConfigurationException(
-                    "Valid values for 'text-rendering' are 'auto' and 'bitmap'. Value found: " 
-                        + textRendering);
-        }
+    public void setQualityBeforeSpeed(boolean qualityBeforeSpeed) {
+        this.qualityBeforeSpeed = qualityBeforeSpeed;
     }
 
     /**
@@ -1498,6 +1473,10 @@
         } catch (IOException ioe) {
             handleIOTrouble(ioe);
         }
+    }
+
+    public void setAllTextAsBitmaps(boolean allTextAsBitmaps) {
+        this.allTextAsBitmaps = allTextAsBitmaps;
     }
     
     

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pcl/PCLRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -23,6 +23,7 @@
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the PCL Renderer.
@@ -31,14 +32,19 @@
 
     private static final String[] MIMES = new String[] {
         MimeConstants.MIME_PCL,
-        MimeConstants.MIME_PCL_ALT};
+        MimeConstants.MIME_PCL_ALT
+    };
     
-    
-    /**@see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /**@see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PCLRenderer();
     }
 
+    /** @see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PCLRendererConfigurator(userAgent);
+    }
+
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
     public boolean needsOutputStream() {
         return true;
@@ -48,5 +54,4 @@
     public String[] getSupportedMimeTypes() {
         return MIMES;
     }
-
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRenderer.java Tue Sep 25 02:00:20 2007
@@ -41,8 +41,6 @@
 import org.w3c.dom.Document;
 
 // Avalon
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.io.IOUtils;
 
 // FOP
@@ -69,7 +67,6 @@
 import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.fonts.Typeface;
 import org.apache.fop.fonts.Font;
-import org.apache.fop.fonts.FontSetup;
 import org.apache.fop.image.FopImage;
 import org.apache.fop.image.ImageFactory;
 import org.apache.fop.image.XMLImage;
@@ -86,7 +83,6 @@
 import org.apache.fop.pdf.PDFGoTo;
 import org.apache.fop.pdf.PDFICCBasedColorSpace;
 import org.apache.fop.pdf.PDFICCStream;
-import org.apache.fop.pdf.PDFGoTo;
 import org.apache.fop.pdf.PDFInfo;
 import org.apache.fop.pdf.PDFLink;
 import org.apache.fop.pdf.PDFMetadata;
@@ -266,38 +262,6 @@
     public PDFRenderer() {
     }
 
-    /**
-     * Configure the PDF renderer.
-     * Get the configuration to be used for pdf stream filters,
-     * fonts etc.
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        //PDF filters
-        this.filterMap = PDFFilterList.buildFilterMapFromConfiguration(cfg);
-
-        //Font configuration
-        List cfgFonts = FontSetup.buildFontListFromConfiguration(cfg, this);
-        if (this.fontList == null) {
-            this.fontList = cfgFonts;
-        } else {
-            this.fontList.addAll(cfgFonts);
-        }
-        
-        String s = cfg.getChild(PDF_A_MODE, true).getValue(null);
-        if (s != null) {
-            this.pdfAMode = PDFAMode.valueOf(s);
-        }
-        s = cfg.getChild(PDF_X_MODE, true).getValue(null);
-        if (s != null) {
-            this.pdfXMode = PDFXMode.valueOf(s);
-        }
-        s = cfg.getChild(KEY_OUTPUT_PROFILE, true).getValue(null);
-        if (s != null) {
-            this.outputProfileURI = s;
-        }
-    }
-
     private boolean booleanValueOf(Object obj) {
         if (obj instanceof Boolean) {
             return ((Boolean)obj).booleanValue();
@@ -1890,6 +1854,22 @@
     /** @see org.apache.fop.render.AbstractRenderer */
     public String getMimeType() {
         return MIME_TYPE;
+    }
+    
+    public void setAMode(PDFAMode mode) {
+        this.pdfAMode = mode;
+    }
+
+    public void setXMode(PDFXMode mode) {
+        this.pdfXMode = mode;        
+    }
+
+    public void setOutputProfileURI(String outputProfileURI) {
+        this.outputProfileURI = outputProfileURI;
+    }
+
+    public void setFilterMap(Map filterMap) {
+        this.filterMap = filterMap;
     }
 }
 

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/pdf/PDFRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -23,6 +23,7 @@
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the PDF Renderer.
@@ -31,12 +32,16 @@
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_PDF};
     
-    
-    /**@see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /** @see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PDFRenderer();
     }
 
+    /** @see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PDFRendererConfigurator(userAgent);
+    }
+    
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
     public boolean needsOutputStream() {
         return true;

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/print/PrintRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/print/PrintRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/print/PrintRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/print/PrintRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -22,7 +22,9 @@
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
+import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the Print Renderer.
@@ -31,10 +33,14 @@
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_PRINT};
     
-    
-    /**@see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /**@see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PrintRenderer();
+    }
+
+    /** @see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PrintRendererConfigurator(userAgent);
     }
 
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/NativeTextHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/NativeTextHandler.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/NativeTextHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/NativeTextHandler.java Tue Sep 25 02:00:20 2007
@@ -159,7 +159,7 @@
         }
         int fontSize = 1000 * f.getSize();
         String style = f.isItalic() ? "italic" : "normal";
-        int weight = f.isBold() ? Font.BOLD : Font.NORMAL;
+        int weight = f.isBold() ? Font.WEIGHT_BOLD : Font.WEIGHT_NORMAL;
                 
         FontTriplet triplet = fontInfo.findAdjustWeight(fontFamily, style, weight);
         if (triplet == null) {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRenderer.java Tue Sep 25 02:00:20 2007
@@ -35,8 +35,6 @@
 import javax.xml.transform.Source;
 
 // FOP
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -61,7 +59,6 @@
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
 import org.apache.fop.fonts.Font;
-import org.apache.fop.fonts.FontSetup;
 import org.apache.fop.fonts.LazyFont;
 import org.apache.fop.fonts.Typeface;
 import org.apache.fop.image.EPSImage;
@@ -145,24 +142,6 @@
     /** This is a map of PSResource instances of all forms (key: uri) */
     private Map formResources;
     
-    /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        super.configure(cfg);
-        this.autoRotateLandscape = cfg.getChild(AUTO_ROTATE_LANDSCAPE).getValueAsBoolean(false);
-        this.languageLevel = cfg.getChild(LANGUAGE_LEVEL).getValueAsInteger(this.languageLevel);
-        this.twoPassGeneration = cfg.getChild(OPTIMIZE_RESOURCES).getValueAsBoolean(false);
-
-        //Font configuration
-        List cfgFonts = FontSetup.buildFontListFromConfiguration(cfg, this);
-        if (this.fontList == null) {
-            this.fontList = cfgFonts;
-        } else {
-            this.fontList.addAll(cfgFonts);
-        }
-    }
-
     /**
      * @see org.apache.fop.render.Renderer#setUserAgent(FOUserAgent)
      */

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -23,6 +23,7 @@
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the PostScript Renderer.
@@ -31,12 +32,16 @@
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_POSTSCRIPT};
     
-    
-    /** @see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /** @see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PSRenderer();
     }
 
+    /** @see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PSRendererConfigurator(userAgent);
+    }
+
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
     public boolean needsOutputStream() {
         return true;
@@ -46,5 +51,4 @@
     public String[] getSupportedMimeTypes() {
         return MIMES;
     }
-
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSTextPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSTextPainter.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSTextPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/ps/PSTextPainter.java Tue Sep 25 02:00:20 2007
@@ -367,8 +367,8 @@
     private int getWeight(AttributedCharacterIterator aci) {
         Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);
         return ((taWeight != null) &&  (taWeight.floatValue() > 1.0)) 
-                       ? Font.BOLD
-                       : Font.NORMAL;
+                       ? Font.WEIGHT_BOLD
+                       : Font.WEIGHT_NORMAL;
     }
 
     private Font makeFont(AttributedCharacterIterator aci) {
@@ -402,7 +402,7 @@
                 }
             }
         }
-        FontTriplet triplet = fontInfo.fontLookup("any", style, Font.NORMAL);
+        FontTriplet triplet = fontInfo.fontLookup("any", style, Font.WEIGHT_NORMAL);
         int fsize = (int)(fontSize.floatValue() * 1000);
         return fontInfo.getFontInstance(triplet, fsize);
     }
@@ -411,7 +411,7 @@
         final String style = getStyle(aci);
         final int weight = getWeight(aci);
         int fStyle = java.awt.Font.PLAIN;
-        if (weight == Font.BOLD) {
+        if (weight == Font.WEIGHT_BOLD) {
             fStyle |= java.awt.Font.BOLD;
         }
         if ("italic".equals(style)) {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRenderer.java Tue Sep 25 02:00:20 2007
@@ -27,8 +27,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.area.Area;
 import org.apache.fop.area.CTM;
@@ -114,12 +112,6 @@
     /** @see org.apache.fop.render.AbstractRenderer#getMimeType() */
     public String getMimeType() {
         return "text/plain";
-    }
-
-    /** @see org.apache.fop.render.AbstractRenderer */
-    public void configure(Configuration conf) throws ConfigurationException {
-        super.configure(conf);
-        this.encoding = conf.getChild("encoding", true).getValue(null);
     }
     
     /**

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/txt/TXTRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -23,6 +23,7 @@
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the Plain Text Renderer.
@@ -31,12 +32,16 @@
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_PLAIN_TEXT};
     
-    
-    /**@see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /**@see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new TXTRenderer();
     }
 
+    /**@see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new TXTRendererConfigurator(userAgent);
+    }
+
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */
     public boolean needsOutputStream() {
         return true;
@@ -46,5 +51,4 @@
     public String[] getSupportedMimeTypes() {
         return MIMES;
     }
-
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRenderer.java Tue Sep 25 02:00:20 2007
@@ -41,8 +41,6 @@
 import org.xml.sax.ext.LexicalHandler;
 import org.xml.sax.helpers.AttributesImpl;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.fop.util.QName;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
@@ -83,7 +81,6 @@
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.extensions.ExtensionAttachment;
 import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontSetup;
 import org.apache.fop.fonts.FontTriplet;
 import org.apache.fop.render.PrintRenderer;
 import org.apache.fop.render.Renderer;
@@ -137,22 +134,6 @@
      */
     public XMLRenderer() {
         context = new RendererContext(this, XML_MIME_TYPE);
-    }
-
-    /**
-     * Configure the XML renderer.
-     * Get the configuration to be used for fonts etc.
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        super.configure(cfg);
-        //Font configuration
-        List cfgFonts = FontSetup.buildFontListFromConfiguration(cfg, this);
-        if (this.fontList == null) {
-            this.fontList = cfgFonts;
-        } else {
-            this.fontList.addAll(cfgFonts);
-        }
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/render/xml/XMLRendererMaker.java Tue Sep 25 02:00:20 2007
@@ -22,7 +22,9 @@
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.AbstractRendererMaker;
+import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererConfigurator;
 
 /**
  * RendererMaker for the Area Tree XML Renderer.
@@ -31,10 +33,14 @@
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_AREA_TREE};
     
-    
-    /**@see org.apache.fop.render.AbstractRendererMaker */
-    public Renderer makeRenderer(FOUserAgent ua) {
+    /**@see org.apache.fop.render.AbstractRendererMaker#makeRenderer(FOUserAgent) */
+    public Renderer makeRenderer(FOUserAgent userAgent) {
         return new XMLRenderer();
+    }
+
+    /**@see org.apache.fop.render.AbstractRendererMaker#getConfigurator(FOUserAgent) */
+    public RendererConfigurator getConfigurator(FOUserAgent userAgent) {
+        return new PrintRendererConfigurator(userAgent);
     }
 
     /** @see org.apache.fop.render.AbstractRendererMaker#needsOutputStream() */

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFContext.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFContext.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFContext.java Tue Sep 25 02:00:20 2007
@@ -19,8 +19,6 @@
 
 package org.apache.fop.svg;
 
-import java.util.List;
-
 import org.apache.fop.pdf.PDFPage;
 
 /**
@@ -30,24 +28,10 @@
 public class PDFContext {
 
     private PDFPage currentPage;
-    private List fontList;
 
     /** number of pages generated */
     private int pagecount;
     
-    /**
-     * Sets the font list as creates by the FontSetup class.
-     * @param list the font list
-     */
-    public void setFontList(List list) {
-        this.fontList = list;
-    }
-
-    /** @return the font list */
-    public List getFontList() {
-        return this.fontList;
-    }
-
     /** @return true if a page is set up for painting. */
     public boolean isPagePending() {
         return this.currentPage != null;

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java Tue Sep 25 02:00:20 2007
@@ -19,6 +19,7 @@
 
 package org.apache.fop.svg;
 
+import org.apache.fop.Version;
 import org.apache.fop.pdf.PDFDocument;
 import org.apache.fop.pdf.PDFFilterList;
 import org.apache.fop.pdf.PDFPage;
@@ -28,13 +29,8 @@
 import org.apache.fop.pdf.PDFResources;
 import org.apache.fop.pdf.PDFColor;
 import org.apache.fop.pdf.PDFAnnotList;
-import org.apache.fop.fonts.FontSetup;
 import org.apache.fop.fonts.FontInfo;
-import org.apache.avalon.framework.CascadingRuntimeException;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.fop.fonts.FontSetup;
 
 import java.awt.Graphics;
 import java.awt.Font;
@@ -56,8 +52,7 @@
  * @version $Id$
  * @see org.apache.fop.svg.PDFGraphics2D
  */
-public class PDFDocumentGraphics2D extends PDFGraphics2D
-            implements Configurable, Initializable {
+public class PDFDocumentGraphics2D extends PDFGraphics2D {
 
     private PDFContext pdfContext;
 
@@ -89,9 +84,6 @@
      */
     protected AffineTransform initialTransform;
 
-    //Avalon component
-    private Configuration cfg;
-
     /**
      * Create a new PDFDocumentGraphics2D.
      * This is used to create a new pdf document, the height,
@@ -106,19 +98,9 @@
     public PDFDocumentGraphics2D(boolean textAsShapes) {
         super(textAsShapes);
 
+        this.pdfDoc = new PDFDocument("Apache FOP Version " + Version.getVersion() 
+                + ": PDFDocumentGraphics2D");
         this.pdfContext = new PDFContext();
-        if (!textAsShapes) {
-            fontInfo = new FontInfo();
-            FontSetup.setup(fontInfo, null, null);
-            //FontState fontState = new FontState("Helvetica", "normal",
-            //                          FontInfo.NORMAL, 12, 0);
-        }
-        try {
-            initialize();
-        } catch (Exception e) {
-            //Should never happen
-            throw new CascadingRuntimeException("Internal error", e);
-        }
     }
 
     /**
@@ -154,33 +136,6 @@
     }
 
     /**
-     * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
-        this.cfg = cfg;
-        this.pdfContext.setFontList(FontSetup.buildFontListFromConfiguration(cfg));
-    }
-
-    /**
-     * @see org.apache.avalon.framework.activity.Initializable#initialize()
-     */
-    public void initialize() throws Exception {
-        if (this.fontInfo == null || this.cfg != null) {
-            fontInfo = new FontInfo();
-            FontSetup.setup(fontInfo, this.pdfContext.getFontList(), null);
-            //FontState fontState = new FontState("Helvetica", "normal",
-            //                          FontInfo.NORMAL, 12, 0);
-        }
-
-        this.pdfDoc = new PDFDocument("Apache FOP: SVG to PDF Transcoder");
-
-        if (this.cfg != null) {
-            this.pdfDoc.setFilterMap(
-                PDFFilterList.buildFilterMapFromConfiguration(cfg));
-        }
-    }
-
-    /**
      * Setup the document.
      * @param stream the output stream to write the document
      * @param width the width of the page
@@ -197,6 +152,18 @@
     }
 
     /**
+     * Setup a default FontInfo instance if none has been setup before. 
+     */
+    public void setupDefaultFontInfo() {
+        if (fontInfo == null) {
+            //Default minimal fonts
+            FontInfo fontInfo = new FontInfo();
+            FontSetup.setup(fontInfo, null, null);
+            setFontInfo(fontInfo);
+        }
+    }
+    
+    /**
      * Set the device resolution for rendering.  Will take effect at the
      * start of the next page.
      * @param deviceDPI the device resolution (in dpi)
@@ -213,6 +180,14 @@
     }
 
     /**
+     * Sets the font info for this PDF document.
+     * @param fontInfo the font info object with all the fonts
+     */
+    public void setFontInfo(FontInfo fontInfo) {
+        this.fontInfo = fontInfo;
+    }
+    
+    /**
      * Get the font info for this pdf document.
      * @return the font information
      */
@@ -229,6 +204,14 @@
     }
 
     /**
+     * Return the PDFContext for this instance.
+     * @return the PDFContext
+     */
+    public PDFContext getPDFContext() {
+        return this.pdfContext;
+    }
+    
+    /**
      * Set the dimensions of the svg document that will be drawn.
      * This is useful if the dimensions of the svg document are different
      * from the pdf document that is to be created.
@@ -295,6 +278,10 @@
         if (pdfContext.isPagePending()) {
             return;
         }
+        //Setup default font info if no more font configuration has been done by the user.
+        if (!this.textAsShapes && getFontInfo() == null) {
+            setupDefaultFontInfo();
+        }
         try {
             startPage();
         } catch (IOException ioe) {
@@ -389,7 +376,6 @@
     public PDFDocumentGraphics2D(PDFDocumentGraphics2D g) {
         super(g);
         this.pdfContext = g.pdfContext;
-        this.cfg = g.cfg;
         this.width = g.width;
         this.height = g.height;
         this.svgWidth = g.svgWidth;

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFGraphics2D.java Tue Sep 25 02:00:20 2007
@@ -1429,7 +1429,7 @@
             }
             float siz = gFont.getSize2D();
             String style = gFont.isItalic() ? "italic" : "normal";
-            int weight = gFont.isBold() ? Font.BOLD : Font.NORMAL;
+            int weight = gFont.isBold() ? Font.WEIGHT_BOLD : Font.WEIGHT_NORMAL;
             FontTriplet triplet = fontInfo.fontLookup(n, style, weight);
             fontState = fontInfo.getFontInstance(triplet, (int)(siz * 1000 + 0.5));
         } else {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextElementBridge.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextElementBridge.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextElementBridge.java Tue Sep 25 02:00:20 2007
@@ -22,7 +22,6 @@
 import org.apache.batik.gvt.TextNode;
 import org.apache.batik.bridge.SVGTextElementBridge;
 import org.apache.batik.bridge.BridgeContext;
-import org.apache.batik.bridge.TextUtilities;
 import org.apache.batik.gvt.GraphicsNode;
 
 import org.apache.fop.fonts.FontInfo;
@@ -82,12 +81,16 @@
      *         easily rendered using normal drawString on the PDFGraphics2D
      */
     private boolean isSimple(BridgeContext ctx, Element element, GraphicsNode node) {
+        /* I cannot find any reference that 36pt is the maximum font size in PDF. Tests show
+         * no such restriction (jeremias, 28.5.2007)
+         * 
         // Font size, in user space units.
         float fs = TextUtilities.convertFontSize(element).floatValue();
         // PDF cannot display fonts over 36pt
         if (fs > 36) {
             return false;
         }
+        */
 
         Element nodeElement;
         for (Node n = element.getFirstChild();

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextPainter.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTextPainter.java Tue Sep 25 02:00:20 2007
@@ -160,8 +160,8 @@
         String style = ((posture != null) && (posture.floatValue() > 0.0))
                        ? "italic" : "normal";
         int weight = ((taWeight != null)
-                       &&  (taWeight.floatValue() > 1.0)) ? Font.BOLD
-                       : Font.NORMAL;
+                       &&  (taWeight.floatValue() > 1.0)) ? Font.WEIGHT_BOLD
+                       : Font.WEIGHT_NORMAL;
 
         Font fontState = null;
         FontInfo fi = fontInfo;
@@ -187,7 +187,7 @@
             }
         }
         if (!found) {
-            FontTriplet triplet = fontInfo.fontLookup("any", style, Font.NORMAL);
+            FontTriplet triplet = fontInfo.fontLookup("any", style, Font.WEIGHT_NORMAL);
             int fsize = (int)(size.floatValue() * 1000);
             fontState = fontInfo.getFontInstance(triplet, fsize);
         } else {
@@ -196,7 +196,7 @@
             }
         }
         int fStyle = java.awt.Font.PLAIN;
-        if (weight == Font.BOLD) {
+        if (weight == Font.WEIGHT_BOLD) {
             if (style.equals("italic")) {
                 fStyle = java.awt.Font.BOLD | java.awt.Font.ITALIC;
             } else {

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTranscoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTranscoder.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTranscoder.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/svg/PDFTranscoder.java Tue Sep 25 02:00:20 2007
@@ -25,7 +25,6 @@
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.container.ContainerUtil;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.UnitProcessor;
 import org.apache.batik.bridge.UserAgent;
@@ -35,6 +34,9 @@
 import org.apache.batik.transcoder.TranscodingHints;
 import org.apache.batik.transcoder.image.ImageTranscoder;
 import org.apache.batik.transcoder.keys.FloatKey;
+import org.apache.fop.Version;
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.fonts.FontSetup;
 import org.w3c.dom.Document;
 import org.w3c.dom.svg.SVGLength;
 
@@ -120,12 +122,16 @@
         throws TranscoderException {
 
         graphics = new PDFDocumentGraphics2D();
+        graphics.getPDFDocument().getInfo().setProducer("Apache FOP Version " 
+                + Version.getVersion() 
+                + ": PDF Transcoder for Batik");
         
         try {
             if (this.cfg != null) {
-                ContainerUtil.configure(graphics, this.cfg);
+                PDFDocumentGraphics2DConfigurator configurator
+                        = new PDFDocumentGraphics2DConfigurator();
+                configurator.configure(graphics, this.cfg);
             }
-            ContainerUtil.initialize(graphics);
         } catch (Exception e) {
             throw new TranscoderException(
                 "Error while setting up PDFDocumentGraphics2D", e);
@@ -133,7 +139,9 @@
 
         super.transcode(document, uri, output);
 
-        getLogger().trace("document size: " + width + " x " + height);
+        if (getLogger().isTraceEnabled()) {
+            getLogger().trace("document size: " + width + " x " + height);
+        }
         
         // prepare the image to be painted
         UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, 
@@ -144,7 +152,9 @@
         float heightInPt = UnitProcessor.userSpaceToSVG(height, SVGLength.SVG_LENGTHTYPE_PT, 
                 UnitProcessor.HORIZONTAL_LENGTH, uctx);
         int h = (int)(heightInPt + 0.5);
-        getLogger().trace("document size: " + w + "pt x " + h + "pt");
+        if (getLogger().isTraceEnabled()) {
+            getLogger().trace("document size: " + w + "pt x " + h + "pt");
+        }
 
         // prepare the image to be painted
         //int w = (int)(width + 0.5);

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/util/CharUtilities.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/util/CharUtilities.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/util/CharUtilities.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/java/org/apache/fop/util/CharUtilities.java Tue Sep 25 02:00:20 2007
@@ -64,8 +64,8 @@
     public static final char ZERO_WIDTH_NOBREAK_SPACE = '\uFEFF';
     /** soft hyphen */
     public static final char SOFT_HYPHEN = '\u00AD';
-    
-    
+
+
     /**
      * Utility class: Constructor prevents instantiating when subclassed.
      */
@@ -98,7 +98,17 @@
     public static boolean isBreakableSpace(char c) {
         return (c == SPACE || isFixedWidthSpace(c));
     }
-    
+
+    /**
+     * Method to determine if the character is a zero-width space.
+     * @param c the character to check
+     * @return true if the character is a zero-width space
+     */
+    public static boolean isZeroWidthSpace(char c) {
+        return c == ZERO_WIDTH_SPACE           // 200Bh
+            || c == ZERO_WIDTH_NOBREAK_SPACE;  // FEFFh (also used as BOM)
+    }
+
     /**
      * Method to determine if the character is a (breakable) fixed-width space.
      * @param c the character to check
@@ -111,7 +121,7 @@
 //      c == '\u2002'                   // en space
 //      c == '\u2003'                   // em space
 //      c == '\u2004'                   // three-per-em space
-//      c == '\u2005'                   // four--per-em space
+//      c == '\u2005'                   // four-per-em space
 //      c == '\u2006'                   // six-per-em space
 //      c == '\u2007'                   // figure space
 //      c == '\u2008'                   // punctuation space
@@ -120,7 +130,7 @@
 //      c == '\u200B'                   // zero width space
 //      c == '\u3000'                   // ideographic space
     }
-    
+
     /**
      * Method to determine if the character is a nonbreaking
      * space.

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java Tue Sep 25 02:00:20 2007
@@ -26,8 +26,6 @@
 import java.io.OutputStream;
 import java.io.Writer;
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.batik.dom.GenericDOMImplementation;
 import org.apache.batik.svggen.SVGGeneratorContext;
 import org.apache.batik.svggen.SVGGraphics2D;
@@ -76,13 +74,6 @@
 
     /** Creates TIFF renderer. */
     public SVGRenderer() {
-    }
-
-    /**
-     * @see org.apache.fop.render.AbstractRenderer#configure(
-     *          org.apache.avalon.framework.configuration.Configuration)
-     */
-    public void configure(Configuration cfg) throws ConfigurationException {
     }
 
     /** @see org.apache.fop.render.Renderer#startRenderer(java.io.OutputStream) */

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/status.xml?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/status.xml Tue Sep 25 02:00:20 2007
@@ -28,6 +28,20 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="update">
+        Updated PDF/A-1b support according to ISO-19005-1:2005/Cor.1:2007.
+      </action>
+      <action context="Code" dev="JM" type="add" fixes-bug="41831" due-to="Adrian Cumiskey">
+        Add support for font auto-detection (easier font configuration).
+      </action>
+      <action context="Code" dev="JM" type="update" fixes-bug="42406" due-to="Hussein Shafie">
+        Use source resolution setting for bitmap images which don't provide their own
+        resolution.
+      </action>
+      <action context="Code" dev="JM" type="fix" fixes-bug="42109" due-to="Paul Vinkenoog">
+        Fixed the rendering of zero-width spaces for certain fonts by not generating them into
+        the area tree.
+      </action>
       <action context="Code" dev="LF" type="fix">
         Fixed a problem with disappearing footnotes inside hyphenated inlines (and footnotes with hyphenated inline child).
       </action>

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/config/test_fontbase_bad.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/config/test_fontbase_bad.xconf?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/config/test_fontbase_bad.xconf (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/config/test_fontbase_bad.xconf Tue Sep 25 02:00:20 2007
@@ -3,6 +3,9 @@
   <!-- Strict configuration On -->
   <strict-configuration>true</strict-configuration>
 
+  <!-- Switch off font caching for the purposes of the unit test -->
+  <use-cache>false</use-cache>  
+
   <!-- Base URL for resolving relative URLs -->
   <base>./</base>
 

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/BaseUserConfigTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/BaseUserConfigTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/BaseUserConfigTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/BaseUserConfigTestCase.java Tue Sep 25 02:00:20 2007
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-/* $Id$ */
+/* $Id: $ */
 
 package org.apache.fop.config;
 
@@ -28,7 +28,6 @@
 import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.render.pdf.BasePDFTestCase;
 import org.xml.sax.SAXException;
@@ -39,7 +38,7 @@
  */
 public abstract class BaseUserConfigTestCase extends BasePDFTestCase {
 
-    protected static DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
+    protected DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
 
     /** logging instance */
     protected Log log = LogFactory.getLog(BaseUserConfigTestCase.class);
@@ -59,28 +58,19 @@
         // do nothing
     }
 
-    /**
-     * Test using a standard FOP font
-     * @throws Exception checkstyle wants a comment here, even a silly one
-     */
-    public void testUserConfig() throws Exception {
-        try {
-            fopFactory.setUserConfig(getUserConfig());        
-            final File baseDir = getBaseDir();
-            final String fontFOFilePath = getFontFOFilePath();
-            File foFile = new File(baseDir, fontFOFilePath);
-            final boolean dumpOutput = false;
-            FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
-            convertFO(foFile, foUserAgent, dumpOutput);
-            fail( getName() + ": Expected Configuration Exception" );
-        } catch (FOPException e) {
-            // this *should* happen!
-        } catch (Exception e) {
-            fail( getName() + ": Expected FOPException but got: " + e.getMessage() );
-        }
+    protected void initConfig() throws Exception {
+        fopFactory.setUserConfig(getUserConfig());                
     }
 
-
+    protected void convertFO() throws Exception {
+        final File baseDir = getBaseDir();
+        final String fontFOFilePath = getFontFOFilePath();
+        File foFile = new File(baseDir, fontFOFilePath);
+        final boolean dumpOutput = false;
+        FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
+        convertFO(foFile, foUserAgent, dumpOutput);
+    }
+    
     /**
      * get test FOP config File
      * @return fo test filepath
@@ -96,11 +86,31 @@
      * @throws SAXException 
      * @throws ConfigurationException 
      */
-    protected Configuration getUserConfig(String configString)
-            throws ConfigurationException, SAXException, IOException {
+    protected Configuration getUserConfig(String configString) throws ConfigurationException, SAXException, IOException {
         return cfgBuilder.build(new ByteArrayInputStream(configString.getBytes()));
     }
 
+    /** get base config directory */
+    protected String getBaseConfigDir() {
+        return "test/config";
+    }
+
+    /**
+     * @return user config File
+     */
+    abstract protected String getUserConfigFilename();
+
+    /*
+     * @see junit.framework.TestCase#getName()
+     */
+    public String getName() {
+        return getUserConfigFilename();
+    }
+
+    protected File getUserConfigFile() {
+        return new File(getBaseConfigDir() + File.separator + getUserConfigFilename());
+    }
+
     /**
      * get test FOP Configuration
      * @return fo test filepath
@@ -108,18 +118,7 @@
      * @throws SAXException 
      * @throws ConfigurationException 
      */
-    protected Configuration getUserConfig()
-            throws ConfigurationException, SAXException, IOException {
+    protected Configuration getUserConfig() throws ConfigurationException, SAXException, IOException {
         return cfgBuilder.buildFromFile(getUserConfigFile());
-    }
-    
-    /** get base config directory */
-    protected String getBaseConfigDir() {
-        return "test/config";
-    }
-    
-    /**
-     * @return user config File
-     */
-    protected abstract File getUserConfigFile();
+    }        
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java Tue Sep 25 02:00:20 2007
@@ -19,20 +19,19 @@
 
 package org.apache.fop.config;
 
-import java.io.File;
-
-// this font is without a metrics-url or an embed-url
-public class FontAttributesMissingTestCase extends BaseUserConfigTestCase {
+/*
+ * this font is without a metrics-url or an embed-url
+ */
+public class FontAttributesMissingTestCase extends BaseDestructiveUserConfigTestCase {
 
     public FontAttributesMissingTestCase(String name) {
         super(name);
     }
 
-    protected File getUserConfigFile() {
-        return new File( getBaseConfigDir() + "/test_fontattributes_missing.xconf");
-    }
-    
-    public String getName() {
-        return "test_fontattributes_missing.xconf";
+    /**
+     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
+     */
+    public String getUserConfigFilename() {
+        return "test_font_attributes_missing.xconf";
     }
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontBaseBadTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontBaseBadTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontBaseBadTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontBaseBadTestCase.java Tue Sep 25 02:00:20 2007
@@ -19,10 +19,10 @@
 
 package org.apache.fop.config;
 
-import java.io.File;
-
-// this font base does not exist and a relative font path is used
-public class FontBaseBadTestCase extends BaseUserConfigTestCase {
+/*
+ * this font base does not exist and a relative font path is used
+ */ 
+public class FontBaseBadTestCase extends BaseDestructiveUserConfigTestCase {
 
     public FontBaseBadTestCase(String name) {
         super(name);
@@ -34,16 +34,9 @@
     }
 
     /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFile()
-     */
-    protected File getUserConfigFile() {
-        return new File( getBaseConfigDir() + "/test_fontbase_bad.xconf");
-    }
-    
-    /**
-     * @return configuration filename
+     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
      */
-    public String getName() {
+    public String getUserConfigFilename() {
         return "test_fontbase_bad.xconf";
     }
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java Tue Sep 25 02:00:20 2007
@@ -19,20 +19,19 @@
 
 package org.apache.fop.config;
 
-import java.io.File;
-
-// this font has an embed-url that does not exist on filesystem
-public class FontTripletAttributeMissingTestCase extends BaseUserConfigTestCase {
+/*
+ * this font has a missing font triplet attribute
+ */ 
+public class FontTripletAttributeMissingTestCase extends BaseDestructiveUserConfigTestCase {
 
     public FontTripletAttributeMissingTestCase(String name) {
         super(name);
     }
 
-    protected File getUserConfigFile() {
-        return new File( getBaseConfigDir() + "/test_fonttripletattribute_missing.xconf");
-    }
-    
-    public String getName() {
-        return "test_fonttripletattribute_missing.xconf";
+    /**
+     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
+     */
+    public String getUserConfigFilename() {
+        return "test_font_tripletattribute_missing.xconf";
     }
 }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/UserConfigTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/UserConfigTestSuite.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/UserConfigTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/config/UserConfigTestSuite.java Tue Sep 25 02:00:20 2007
@@ -38,10 +38,12 @@
         suite.addTest(new TestSuite(FontBaseBadTestCase.class));
         suite.addTest(new TestSuite(FontAttributesMissingTestCase.class));
         suite.addTest(new TestSuite(FontTripletAttributeMissingTestCase.class));
-        suite.addTest(new TestSuite(MetricsUrlBadTestCase.class));
-        suite.addTest(new TestSuite(EmbedUrlBadTestCase.class));
-        suite.addTest(new TestSuite(MetricsUrlMalformedTestCase.class));
-        suite.addTest(new TestSuite(EmbedUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontMetricsUrlBadTestCase.class));
+        suite.addTest(new TestSuite(FontEmbedUrlBadTestCase.class));
+        suite.addTest(new TestSuite(FontMetricsUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontEmbedUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontsDirectoryRecursiveTestCase.class));
+        suite.addTest(new TestSuite(FontsAutoDetectTestCase.class));
         //$JUnit-END$
         return suite;
     }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java Tue Sep 25 02:00:20 2007
@@ -61,7 +61,7 @@
 public class AreaTreeParserTestCase extends XMLTestCase {
 
     // configure fopFactory as desired
-    private FopFactory fopFactory = FopFactory.newInstance();
+    private static FopFactory fopFactory = FopFactory.newInstance();
     
     private static SAXTransformerFactory tFactory 
             = (SAXTransformerFactory)SAXTransformerFactory.newInstance();

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java Tue Sep 25 02:00:20 2007
@@ -93,7 +93,10 @@
         return result;
     }
 
-    /** get FOP config File */
+    /** 
+     * get FOP config File 
+     * @return user config file to be used for testing 
+     */
     protected File getUserConfigFile() {
         return new File("test/test.xconf");
     }

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/block_white-space_4.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/block_white-space_4.xml?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/block_white-space_4.xml (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/layoutengine/standard-testcases/block_white-space_4.xml Tue Sep 25 02:00:20 2007
@@ -164,8 +164,8 @@
     <true xpath="//block[@prod-id='l-hair-space']/lineArea/text/*[6]/@adj = 'false'"/>
 
     <eval expected="55368" xpath="//block[@prod-id='l-zwsp']/lineArea/text/@ipd"/>
-    <true xpath="//block[@prod-id='l-zwsp']/lineArea/text/*[2]/@adj = 'false'"/>
-    <true xpath="//block[@prod-id='l-zwsp']/lineArea/text/*[6]/@adj = 'false'"/>
+    <!-- zwsp is not rendered to the area tree -->
+    <eval expected="1" xpath="count(//block[@prod-id='l-zwsp']/lineArea/text/space)"/>
 
     <eval expected="55368" xpath="//block[@prod-id='l-nosp']/lineArea/text/@ipd"/>
 
@@ -232,9 +232,9 @@
     <true xpath="//block[@prod-id='c-hair-space']/lineArea/text/*[6]/@adj = 'false'"/>
 
     <eval expected="55368" xpath="//block[@prod-id='c-zwsp']/lineArea/text/@ipd"/>
-    <true xpath="//block[@prod-id='c-zwsp']/lineArea/text/*[2]/@adj = 'false'"/>
-    <true xpath="//block[@prod-id='c-zwsp']/lineArea/text/*[6]/@adj = 'false'"/>
-
+    <!-- zwsp is not rendered to the area tree -->
+    <eval expected="1" xpath="count(//block[@prod-id='c-zwsp']/lineArea/text/space)"/>
+    
     <eval expected="55368" xpath="//block[@prod-id='c-nosp']/lineArea/text/@ipd"/>
 
     <eval expected="190804" xpath="//block[@prod-id='j-sp']/lineArea/text/@ipd"/>
@@ -313,9 +313,9 @@
 
     <eval expected="84280" xpath="//block[@prod-id='j-zwsp']/lineArea/text/@ipd"/>
     <eval expected="28912" xpath="//block[@prod-id='j-zwsp']/lineArea/text/@twsadjust"/>
-    <true xpath="//block[@prod-id='j-zwsp']/lineArea/text/*[2]/@adj = 'false'"/>
-    <true xpath="//block[@prod-id='j-zwsp']/lineArea/text/*[6]/@adj = 'false'"/>
-
+    <!-- zwsp is not rendered to the area tree -->
+    <eval expected="1" xpath="count(//block[@prod-id='j-zwsp']/lineArea/text/space)"/>
+    
     <eval expected="134904" xpath="//block[@prod-id='j-nosp']/lineArea/text/@ipd"/>
     <eval expected="79536" xpath="//block[@prod-id='j-nosp']/lineArea/text/@twsadjust"/>
 
@@ -408,9 +408,9 @@
     <eval expected="85480" xpath="//block[@prod-id='lsj-zwsp']/lineArea/text/@ipd"/>
     <eval expected="14112" xpath="//block[@prod-id='lsj-zwsp']/lineArea/text/@twsadjust"/>
     <eval expected="2000" xpath="//block[@prod-id='lsj-zwsp']/lineArea/text/@tlsadjust"/>
-    <true xpath="//block[@prod-id='lsj-zwsp']/lineArea/text/*[2]/@adj = 'false'"/>
-    <true xpath="//block[@prod-id='lsj-zwsp']/lineArea/text/*[6]/@adj = 'false'"/>
-
+    <!-- zwsp is not rendered to the area tree -->
+    <eval expected="1" xpath="count(//block[@prod-id='lsj-zwsp']/lineArea/text/space)"/>
+    
     <eval expected="140237" xpath="//block[@prod-id='lsj-nosp']/lineArea/text/@ipd"/>
     <eval expected="64869" xpath="//block[@prod-id='lsj-nosp']/lineArea/text/@twsadjust"/>
     <eval expected="2000" xpath="//block[@prod-id='lsj-nosp']/lineArea/text/@tlsadjust"/>

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/test.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/test.xconf?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/test.xconf (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/test.xconf Tue Sep 25 02:00:20 2007
@@ -1,16 +1,23 @@
 <?xml version="1.0"?>
 <fop version="1.0">
+
+  <!-- Switch off font caching for the purposes of unit testing -->
+  <use-cache>false</use-cache>
+  
   <renderers>
     <renderer mime="application/pdf">
       <fonts>
         <font metrics-url="test/resources/fonts/glb12.ttf.xml" embed-url="test/resources/fonts/glb12.ttf">
           <font-triplet name="Gladiator" style="normal" weight="normal"/>
+          <font-triplet name="Gladiator" style="normal" weight="bold"/>
         </font>
         <font metrics-url="test/resources/fonts/glb12.ttf.ansi.xml" embed-url="test/resources/fonts/glb12.ttf">
           <font-triplet name="Gladiator-Ansi" style="normal" weight="normal"/>
+          <font-triplet name="Gladiator-Ansi" style="normal" weight="bold"/>
         </font>
         <font metrics-url="test/resources/fonts/glb12.ttf.ansi.xml">
           <font-triplet name="Gladiator-Non-Embedded" style="normal" weight="normal"/>
+          <font-triplet name="Gladiator-Non-Embedded" style="normal" weight="bold"/>
         </font>
       </fonts>
     </renderer>

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/minimal-pdf-a.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/minimal-pdf-a.fo?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/minimal-pdf-a.fo (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/minimal-pdf-a.fo Tue Sep 25 02:00:20 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Gladiator">
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Gladiator" font-weight="bold">
   <fo:layout-master-set>
     <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
       <fo:region-body/>

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/with-cmyk-images.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/with-cmyk-images.fo?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/with-cmyk-images.fo (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-a/with-cmyk-images.fo Tue Sep 25 02:00:20 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Gladiator">
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Gladiator" font-weight="bold">
   <fo:layout-master-set>
     <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin="2cm">
       <fo:region-body/>

Modified: xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-encoding/pdf-encoding-test.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-encoding/pdf-encoding-test.xconf?rev=579136&r1=579135&r2=579136&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-encoding/pdf-encoding-test.xconf (original)
+++ xmlgraphics/fop/branches/Temp_Interleaved_Page_Line_Breaking/test/xml/pdf-encoding/pdf-encoding-test.xconf Tue Sep 25 02:00:20 2007
@@ -23,6 +23,9 @@
 -->
 
 <fop version="1.0">
+  <!-- Switch off font caching for the purposes of unit testing -->
+  <cache-fonts>false</cache-fonts>
+
   <renderers>
     <renderer mime="application/pdf">
       <!-- disable PDF text compression -->



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org