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 vh...@apache.org on 2012/04/05 18:20:17 UTC

svn commit: r1309921 [39/42] - in /xmlgraphics/fop/branches/Temp_TrueTypeInPostScript: ./ examples/embedding/ examples/embedding/java/embedding/ examples/embedding/java/embedding/atxml/ examples/embedding/java/embedding/tools/ examples/plan/src/org/apa...

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/AdvancedMessageFormat.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/AdvancedMessageFormat.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/AdvancedMessageFormat.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/AdvancedMessageFormat.java Thu Apr  5 16:19:19 2012
@@ -46,24 +46,27 @@ public class AdvancedMessageFormat {
     /** Regex that matches "," but not "\," (escaped comma) */
     static final Pattern COMMA_SEPARATOR_REGEX = Pattern.compile("(?<!\\\\),");
 
-    private static final Map PART_FACTORIES = new java.util.HashMap();
-    private static final List OBJECT_FORMATTERS = new java.util.ArrayList();
-    private static final Map FUNCTIONS = new java.util.HashMap();
+    private static final Map<String, PartFactory> PART_FACTORIES
+        = new java.util.HashMap<String, PartFactory>();
+    private static final List<ObjectFormatter> OBJECT_FORMATTERS
+        = new java.util.ArrayList<ObjectFormatter>();
+    private static final Map<Object, Function> FUNCTIONS
+        = new java.util.HashMap<Object, Function>();
 
     private CompositePart rootPart;
 
     static {
-        Iterator iter;
-        iter = Service.providers(PartFactory.class, true);
+        Iterator<Object> iter;
+        iter = Service.providers(PartFactory.class);
         while (iter.hasNext()) {
             PartFactory factory = (PartFactory)iter.next();
             PART_FACTORIES.put(factory.getFormat(), factory);
         }
-        iter = Service.providers(ObjectFormatter.class, true);
+        iter = Service.providers(ObjectFormatter.class);
         while (iter.hasNext()) {
             OBJECT_FORMATTERS.add((ObjectFormatter)iter.next());
         }
-        iter = Service.providers(Function.class, true);
+        iter = Service.providers(Function.class);
         while (iter.hasNext()) {
             Function function = (Function)iter.next();
             FUNCTIONS.put(function.getName(), function);
@@ -189,7 +192,7 @@ public class AdvancedMessageFormat {
      * @param params a Map of named parameters (Contents: <String, Object>)
      * @return the formatted message
      */
-    public String format(Map params) {
+    public String format(Map<String, Object> params) {
         StringBuffer sb = new StringBuffer();
         format(params, sb);
         return sb.toString();
@@ -200,7 +203,7 @@ public class AdvancedMessageFormat {
      * @param params a Map of named parameters (Contents: <String, Object>)
      * @param target the target StringBuffer to write the formatted message to
      */
-    public void format(Map params, StringBuffer target) {
+    public void format(Map<String, Object> params, StringBuffer target) {
         rootPart.write(target, params);
     }
 
@@ -215,14 +218,14 @@ public class AdvancedMessageFormat {
          * @param sb the target string buffer
          * @param params the parameters to work with
          */
-        void write(StringBuffer sb, Map params);
+        void write(StringBuffer sb, Map<String, Object> params);
 
         /**
          * Indicates whether there is any content that is generated by this message part.
          * @param params the parameters to work with
          * @return true if the part has content
          */
-        boolean isGenerated(Map params);
+        boolean isGenerated(Map<String, Object> params);
     }
 
     /**
@@ -277,7 +280,7 @@ public class AdvancedMessageFormat {
          * @param params the message parameters
          * @return the function result
          */
-        Object evaluate(Map params);
+        Object evaluate(Map<String, Object> params);
 
         /**
          * Returns the name of the function.
@@ -294,11 +297,11 @@ public class AdvancedMessageFormat {
             this.text = text;
         }
 
-        public void write(StringBuffer sb, Map params) {
+        public void write(StringBuffer sb, Map<String, Object> params) {
             sb.append(text);
         }
 
-        public boolean isGenerated(Map params) {
+        public boolean isGenerated(Map<String, Object> params) {
             return true;
         }
 
@@ -316,7 +319,7 @@ public class AdvancedMessageFormat {
             this.fieldName = fieldName;
         }
 
-        public void write(StringBuffer sb, Map params) {
+        public void write(StringBuffer sb, Map<String, Object> params) {
             if (!params.containsKey(fieldName)) {
                 throw new IllegalArgumentException(
                         "Message pattern contains unsupported field name: " + fieldName);
@@ -325,7 +328,7 @@ public class AdvancedMessageFormat {
             formatObject(obj, sb);
         }
 
-        public boolean isGenerated(Map params) {
+        public boolean isGenerated(Map<String, Object> params) {
             Object obj = params.get(fieldName);
             return obj != null;
         }
@@ -349,9 +352,9 @@ public class AdvancedMessageFormat {
             target.append(obj);
         } else {
             boolean handled = false;
-            Iterator iter = OBJECT_FORMATTERS.iterator();
+            Iterator<ObjectFormatter> iter = OBJECT_FORMATTERS.iterator();
             while (iter.hasNext()) {
-                ObjectFormatter formatter = (ObjectFormatter)iter.next();
+                ObjectFormatter formatter = iter.next();
                 if (formatter.supportsObject(obj)) {
                     formatter.format(target, obj);
                     handled = true;
@@ -375,12 +378,12 @@ public class AdvancedMessageFormat {
             }
         }
 
-        public void write(StringBuffer sb, Map params) {
+        public void write(StringBuffer sb, Map<String, Object> params) {
             Object obj = this.function.evaluate(params);
             formatObject(obj, sb);
         }
 
-        public boolean isGenerated(Map params) {
+        public boolean isGenerated(Map<String, Object> params) {
             Object obj = this.function.evaluate(params);
             return obj != null;
         }
@@ -393,7 +396,7 @@ public class AdvancedMessageFormat {
 
     private static class CompositePart implements Part {
 
-        protected List parts = new java.util.ArrayList();
+        protected List<Part> parts = new java.util.ArrayList<Part>();
         private boolean conditional;
         private boolean hasSections = false;
 
@@ -401,7 +404,7 @@ public class AdvancedMessageFormat {
             this.conditional = conditional;
         }
 
-        private CompositePart(List parts) {
+        private CompositePart(List<Part> parts) {
             this.parts.addAll(parts);
             this.conditional = true;
         }
@@ -411,7 +414,7 @@ public class AdvancedMessageFormat {
                 throw new NullPointerException("part must not be null");
             }
             if (hasSections) {
-                CompositePart composite = (CompositePart)this.parts.get(this.parts.size() - 1);
+                CompositePart composite = (CompositePart) this.parts.get(this.parts.size() - 1);
                 composite.addChild(part);
             } else {
                 this.parts.add(part);
@@ -420,20 +423,20 @@ public class AdvancedMessageFormat {
 
         public void newSection() {
             if (!hasSections) {
-                List p = this.parts;
+                List<Part> p = this.parts;
                 //Dropping into a different mode...
-                this.parts = new java.util.ArrayList();
+                this.parts = new java.util.ArrayList<Part>();
                 this.parts.add(new CompositePart(p));
                 hasSections = true;
             }
             this.parts.add(new CompositePart(true));
         }
 
-        public void write(StringBuffer sb, Map params) {
+        public void write(StringBuffer sb, Map<String, Object> params) {
             if (hasSections) {
-                Iterator iter = this.parts.iterator();
+                Iterator<Part> iter = this.parts.iterator();
                 while (iter.hasNext()) {
-                    CompositePart part = (CompositePart)iter.next();
+                    Part part = iter.next();
                     if (part.isGenerated(params)) {
                         part.write(sb, params);
                         break;
@@ -441,20 +444,20 @@ public class AdvancedMessageFormat {
                 }
             } else {
                 if (isGenerated(params)) {
-                    Iterator iter = this.parts.iterator();
+                    Iterator<Part> iter = this.parts.iterator();
                     while (iter.hasNext()) {
-                        Part part = (Part)iter.next();
+                        Part part = iter.next();
                         part.write(sb, params);
                     }
                 }
             }
         }
 
-        public boolean isGenerated(Map params) {
+        public boolean isGenerated(Map<String, Object> params) {
             if (hasSections) {
-                Iterator iter = this.parts.iterator();
+                Iterator<Part> iter = this.parts.iterator();
                 while (iter.hasNext()) {
-                    Part part = (Part)iter.next();
+                    Part part = iter.next();
                     if (part.isGenerated(params)) {
                         return true;
                     }
@@ -462,9 +465,9 @@ public class AdvancedMessageFormat {
                 return false;
             } else {
                 if (conditional) {
-                    Iterator iter = this.parts.iterator();
+                    Iterator<Part> iter = this.parts.iterator();
                     while (iter.hasNext()) {
-                        Part part = (Part)iter.next();
+                        Part part = iter.next();
                         if (!part.isGenerated(params)) {
                             return false;
                         }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/ChoiceFieldPart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/ChoiceFieldPart.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/ChoiceFieldPart.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/ChoiceFieldPart.java Thu Apr  5 16:19:19 2012
@@ -88,4 +88,4 @@ public class ChoiceFieldPart implements 
 
     }
 
-}
\ No newline at end of file
+}

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/EqualsFieldPart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/EqualsFieldPart.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/EqualsFieldPart.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/EqualsFieldPart.java Thu Apr  5 16:19:19 2012
@@ -89,4 +89,4 @@ public class EqualsFieldPart extends IfF
         }
 
     }
-}
\ No newline at end of file
+}

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/IfFieldPart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/IfFieldPart.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/IfFieldPart.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/IfFieldPart.java Thu Apr  5 16:19:19 2012
@@ -113,4 +113,4 @@ public class IfFieldPart implements Part
         }
 
     }
-}
\ No newline at end of file
+}

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/LocatorFormatter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/LocatorFormatter.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/LocatorFormatter.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/java/org/apache/fop/util/text/LocatorFormatter.java Thu Apr  5 16:19:19 2012
@@ -39,4 +39,4 @@ public class LocatorFormatter implements
         return obj instanceof Locator;
     }
 
-}
\ No newline at end of file
+}

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/mif/MIFHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/mif/MIFHandler.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/mif/MIFHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/mif/MIFHandler.java Thu Apr  5 16:19:19 2012
@@ -19,12 +19,14 @@
 
 package org.apache.fop.render.mif;
 
-// Java
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.xml.sax.SAXException;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.fo.FOEventHandler;
 import org.apache.fop.fo.flow.BasicLink;
@@ -51,7 +53,6 @@ import org.apache.fop.fo.pagination.Page
 import org.apache.fop.fo.pagination.SimplePageMaster;
 import org.apache.fop.fonts.FontSetup;
 import org.apache.fop.render.DefaultFontResolver;
-import org.xml.sax.SAXException;
 
 // TODO: do we really want every method throwing a SAXException
 
@@ -84,7 +85,8 @@ public class MIFHandler extends FOEventH
     public MIFHandler(FOUserAgent ua, OutputStream os) {
         super(ua);
         outStream = os;
-        FontSetup.setup(fontInfo, null, new DefaultFontResolver(ua));
+        boolean base14Kerning = false; //TODO - FIXME
+        FontSetup.setup(fontInfo, null, new DefaultFontResolver(ua), base14Kerning);
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGDocumentHandler.java Thu Apr  5 16:19:19 2012
@@ -48,7 +48,6 @@ import org.apache.commons.io.IOUtils;
 import org.apache.fop.render.bitmap.BitmapRendererEventProducer;
 import org.apache.fop.render.bitmap.MultiFileRenderingUtil;
 import org.apache.fop.render.intermediate.DelegatingFragmentContentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFPainter;
 import org.apache.fop.util.GenerationHelperContentHandler;

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPainter.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPainter.java Thu Apr  5 16:19:19 2012
@@ -49,6 +49,7 @@ import org.apache.fop.render.intermediat
 import org.apache.fop.render.intermediate.IFContext;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFState;
+import org.apache.fop.render.intermediate.IFUtil;
 import org.apache.fop.traits.BorderProps;
 import org.apache.fop.traits.RuleStyle;
 import org.apache.fop.util.ColorUtil;
@@ -319,7 +320,7 @@ public class SVGPainter extends Abstract
 
     /** {@inheritDoc} */
 
-    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[] dx,
+    public void drawText(int x, int y, int letterSpacing, int wordSpacing, int[][] dp,
             String text) throws IFException {
         try {
             establish(MODE_TEXT);
@@ -333,7 +334,8 @@ public class SVGPainter extends Abstract
             if (wordSpacing != 0) {
                 XMLUtil.addAttribute(atts, "word-spacing", SVGUtil.formatMptToPt(wordSpacing));
             }
-            if (dx != null) {
+            if (dp != null) {
+                int[] dx = IFUtil.convertDPToDX(dp);
                 XMLUtil.addAttribute(atts, "dx", SVGUtil.formatMptArrayToPt(dx));
             }
             handler.startElement("text", atts);

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGPrintDocumentHandler.java Thu Apr  5 16:19:19 2012
@@ -27,7 +27,6 @@ import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 
 import org.apache.fop.render.intermediate.IFConstants;
-import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFPainter;
 import org.apache.fop.util.XMLUtil;

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java Thu Apr  5 16:19:19 2012
@@ -26,19 +26,23 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.Writer;
 
-import org.apache.batik.dom.GenericDOMImplementation;
-import org.apache.batik.svggen.SVGGeneratorContext;
-import org.apache.batik.svggen.SVGGraphics2D;
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
+import org.apache.batik.dom.GenericDOMImplementation;
+import org.apache.batik.svggen.SVGGeneratorContext;
+import org.apache.batik.svggen.SVGGraphics2D;
+
+import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.render.bitmap.MultiFileRenderingUtil;
 import org.apache.fop.render.java2d.Java2DGraphicsState;
 import org.apache.fop.render.java2d.Java2DRenderer;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
 
 /**
  * <p>
@@ -67,8 +71,11 @@ public class SVGRenderer extends Java2DR
     /** Helper class for generating multiple files */
     private MultiFileRenderingUtil multiFileUtil;
 
-    /** Default constructor. */
-    public SVGRenderer() {
+    /**
+     * @param userAgent the user agent that contains configuration details. This cannot be null.
+     */
+    public SVGRenderer(FOUserAgent userAgent) {
+        super(userAgent);
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGRendererMaker.java Thu Apr  5 16:19:19 2012
@@ -34,7 +34,7 @@ public class SVGRendererMaker extends Ab
 
     /** {@inheritDoc} */
     public Renderer makeRenderer(FOUserAgent ua) {
-        return new SVGRenderer();
+        return new SVGRenderer(ua);
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/src/sandbox/org/apache/fop/render/svg/SVGSVGHandler.java Thu Apr  5 16:19:19 2012
@@ -19,12 +19,6 @@
 
 package org.apache.fop.render.svg;
 
-import org.apache.batik.dom.svg.SVGDOMImplementation;
-import org.apache.batik.dom.util.DOMUtilities;
-import org.apache.batik.dom.util.XMLSupport;
-import org.apache.fop.render.Renderer;
-import org.apache.fop.render.RendererContext;
-import org.apache.fop.render.XMLHandler;
 import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -32,6 +26,14 @@ import org.w3c.dom.svg.SVGDocument;
 import org.w3c.dom.svg.SVGElement;
 import org.w3c.dom.svg.SVGSVGElement;
 
+import org.apache.batik.dom.svg.SVGDOMImplementation;
+import org.apache.batik.dom.util.DOMUtilities;
+import org.apache.batik.dom.util.XMLSupport;
+
+import org.apache.fop.render.Renderer;
+import org.apache.fop.render.RendererContext;
+import org.apache.fop.render.XMLHandler;
+
 /** The svg:svg element handler. */
 public class SVGSVGHandler implements XMLHandler, SVGRendererContextConstants {
 

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/status.xml?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/status.xml Thu Apr  5 16:19:19 2012
@@ -22,6 +22,7 @@
 
   <developers>
     <!-- In alphabetical order (last name) -->
+    <person name="Glenn Adams"       email="gadams@apache.org"        id="GA"/>
     <person name="Max Berger"        email="mayberger@apache.org"     id="MB"/>
     <person name="Chris Bowditch"    email="cbowditch@apache.org"     id="CB"/>
     <person name="Jay Bryant"        email="jbryant@apache.org"       id="JB"/>
@@ -30,7 +31,9 @@
     <person name="Andreas Delmelle"  email="adelmelle@apache.org"     id="AD"/>
     <person name="Luca Furini"       email="lfurini@apache.org"       id="LF"/>
     <person name="Christian Geisert" email="chrisg@apache.org"        id="CG"/>
+    <person name="Peter Hancock"     email="phancock@apache.org"      id="PH"/>
     <person name="Vincent Hennebert" email="vhennebert@apache.org"    id="VH"/>
+    <person name="Mehdi Houshmand"   email="mehdi@apache.org"         id="MH"/>
     <person name="Clay Leeds"        email="clay@apache.org"          id="CL"/>
     <person name="Manuel Mall"       email="manuel@apache.org"        id="MM"/>
     <person name="Jeremias Märki"    email="jeremias@apache.org"      id="JM"/>
@@ -49,6 +52,7 @@
     <context id="API" title="Changes to the End-User API"/>
     <context id="Extensions" title="Changes to the Bundled Extensions"/>
     <context id="Images" title="Changes to the Image Support"/>
+    <context id="Config" title="Changes to the User Configuration"/>
   </contexts>
 
   <changes>
@@ -58,6 +62,259 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="PH,VH" type="add">
+        Added support for PDF Object Streams. When accessibility is enabled and PDF version 1.5 
+        selected, the structure tree will be stored in object streams in order to reduce the size of 
+        the final PDF.
+      </action>
+      <action context="Code" dev="VH" type="add" fixes-bug="46962" due-to="Alexios Giotis">
+        Fixed deadlock in PropertyCache.
+      </action>
+      <action context="Code" dev="VH" type="add" fixes-bug="51385" due-to="Mehdi Houshmand">
+        Added configuration option to set the version of the output PDF document.
+      </action>
+      <action context="Code" dev="MH" type="fix" fixes-bug="52849" due-to="Luis Bernardo">
+        Fixed bug that caused a configured and installed SVG font to stroked,
+        also added an event indicating when fonts are stroked.
+      </action>
+      <action context="Code" dev="PH" type="fix">
+        Fix of a bug introduced when merging ImproveAccessibility.
+      </action>
+      <action context="Code" dev="PH" type="add">
+          Improved support for empty flow-name mapping (see bugzilla#50391).
+      </action>
+      <action context="Code" dev="GA" type="add" fixes-bug="32789, 49008, 49687" importance="high">
+        Add support for complex scripts, including: full bidi support, support for advanced
+        typographic tables, advanced support for number conversion.
+      </action>
+      <action context="Fonts" dev="GA" type="add">
+        Add support for OpenType advanced typographic tables (GDEF, GSUB, GPOS).
+      </action>
+      <action context="Code" dev="VH" type="fix" fixes-bug="52655" due-to="Luis Bernardo">
+        Fixed rendering of special glyphs when using single-byte encoding mode.
+      </action>
+      <action context="Code" dev="PH" type="add" due-to="VH and PH">
+        Improvements of the Accessibility feature
+      </action>
+      <action context="Code" dev="CB" type="add" fixes-bug="52416" due-to="Luis Bernardo">
+        Suppress unnecessary "font not found warnings" when generating AFP with raster fonts 
+      </action>
+      <action context="Code" dev="CB" type="add" fixes-bug="51209" due-to="Luis Bernardo">
+        SVG text in AFP creates miscoded GOCA text
+      </action>
+      <action context="Code" dev="CB" type="add" fixes-bug="50391" due-to="Peter Hancock">
+        Add support for different flow-name of fo:region-body in FOP
+      </action>
+      <action context="Code" dev="CB" type="add" fixes-bug="51664" due-to="Mehdi Houshmand">
+        Tagged PDF performance improvement plus tests
+      </action>	
+      <action context="Code" dev="MH" type="add" fixes-bug="52197">
+        Improved AdobeStandardEncoding support in AFM files for type1 fonts
+      </action>
+      <action context="Code" dev="VH" type="add" fixes-bug="52151" due-to="Mehdi Houshmand">
+        Added ant script to get JaCoCo code coverage.
+      </action>
+      <action context="Code" dev="VH" type="add" fixes-bug="52136" due-to="Mehdi Houshmand">
+        Added to build file JUnit target that uses a regex to run all of the test cases. This 
+        reduces the risk that some of them are omitted when building FOP.
+      </action>
+      <action context="Code" dev="PH" type="add" fixes-bug="52089" due-to="JM, Mehdi Houshmand">
+        Allow JPEG images to be embedded in an AFP document as is, without being decoded and 
+        encoded.
+      </action>
+      <action context="Code" dev="PH" type="add" fixes-bug="52010" due-to="Mehdi Houshmand">
+        Simplification of the build: Reduced code duplication and layout engine tests.
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        Various bugfixes to make PDFDocumentGraphics2D operational again.
+      </action>
+      <action context="Code" dev="PH" type="add" fixes-bug="51962" due-to="Mehdi Houshmand">
+        Bugfix for when the last simple-page-master referenced in a page-sequence-master is not
+        chosen when force-page-count=odd.
+      </action>
+      <action context="Code" dev="VH" type="add" fixes-bug="51928" due-to="Mehdi Houshmand">
+        Upgraded all tests to JUnit 4.
+      </action>
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="48696">
+        Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
+        Revision 4.
+      </action>
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="51760" due-to="Mehdi Houshmand">
+        Changes the way PostScript handles Graphics2D images such that if the language is set to
+        level 3, the image is stored as an embedded file which has no length limit.  Previously it
+        was stored as an array which has a implementation limit of 65535 elements.
+      </action>
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="51759" due-to="Mehdi Houshmand">
+        PDFFactory responsible for asdigning name to a subset font.
+      </action>
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="51530" due-to="Mehdi Houshmand">
+        Improved support for EBCDIC encoded double byte fonts fo AFP.
+      </action>
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="51205" due-to="Mehdi Houshmand">
+        Corrected typographical errors in AFPBase12FontCollection.
+      </action>
+      <action context="Renderers" dev="PH" type="fix" fixes-bug="48062">
+        Improved fix of a bug relating to PCL painter thread safetly.  Previous fix in rev 895012
+        worked by synchronizing methods of a static instance of Java2DFontMetrics.  This fix uses a
+        unique instance for per thread.
+      </action>
+      <action context="Renderers" dev="PH" type="fix">
+        Fixed a bug in AFP where an ArrayOutofBoundsException is throwqn when embedding a Page 
+        Segment.
+      </action>
+      <action context="Renderers" dev="VH" type="add">
+        Added support for 128bit encryption in PDF output. Based on work by Michael Rubin.
+      </action>
+      <action context="Renderers" dev="PH" type="fix">
+        Fixed a bug in AFP where the object area axes of an Include Object was incorrectly set when 
+        rotated by 180. </action>
+      <action context="Fonts" dev="JM" type="fix" fixes-bug="51596" due-to="Mehdi Houshmand">
+        Fixed a bug in TTF subsetting where a composite glyph could get
+        remapped more than once resulting in garbled character.
+      </action>
+      <action context="Fonts" dev="JM" type="fix" fixes-bug="50605">
+        Fixed a number of bugs concerning Type 1 and other single-byte fonts
+        (glyph width mismatches and overlapping characters).
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Fixed a multi-threading bug for SVG images included through svg:image inside SVG documents.
+      </action>
+      <action context="Renderers" dev="PH" type="add">
+        Added an IFDocumentHandler filter for triggering rendering events.  Created an Event that
+        captures an end page event with the page number.
+      </action>
+      <action context="Renderers" dev="VH" type="fix">
+        Bugfix: alternative text not working in tagged PDF for TIFF images.
+      </action>
+      <action context="Renderers" dev="PH" type="fix" fixes-bug="50909">
+        Fixed io exception in MODCAParser caused by the improper use of mark() and reset() on the
+        MODCA data input stream.  Added unit test. </action>
+      <action context="Fonts" dev="JM" type="fix" fixes-bug="51144" due-to="Mehdi Houshmand">
+        Removed invalid entries in ToUnicode table of CID subset fonts. 
+      </action>
+      <action context="Renderers" dev="JM" type="fix" fixes-bug="50899" due-to="Glenn Adams">
+        Fixed mapping of font weights between CSS values and TextAttribute.WEIGHT_*. 
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        AFP GOCA: fonts were not embedded from within AFPGraphics2D.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        AFP GOCA: Changed the way FOP fonts are selected based on Batik's GVT fonts to match
+        the behaviour of PDF/PS output.
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        Added option to place AFP NOPs right before the end of a named page group (page-sequence),
+        rather than after the start.
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        Added option for PostScript output to optimize for file size rather than quality.
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        AFP GOCA: Added option to disable GOCA and to control text painting inside GOCA graphics.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        AFP GOCA: Work-around for InfoPrint's AFP implementation which seems to lose
+        the character set state over Graphics Data (GAD) boundaries.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Bugfix for AFP GOCA segments: they were not properly marked as appended which could
+        lead to graphics state changes in some implementations.
+      </action>
+      <action context="Renderers" dev="CB" type="fix" fixes-bug="51010" due-to="Max Aster">
+        Bugzilla 51010: Bookmarks create useless lines in RTF 
+      </action>	
+      <action context="Renderers" dev="CB" type="fix" fixes-bug="51008" due-to="Max Aster">
+        Bugzilla 51008: page-number-citation-last does not work in RTF
+      </action>	
+      <action context="Renderers" dev="VH" type="add">
+        Added id element to intermediate format to track the origin of content.
+      </action>
+      <action context="Renderers" dev="AD" type="fix" fixes-bug="50987" due-to="Matthias Reischenbacher">
+        Bugzilla 50988: Fixed a NullPointerException in case a white-space fo:character was removed
+        due to white-space handling.
+      </action>
+      <action context="Renderers" dev="AD" type="fix" fixes-bug="50987" due-to="Martin Koegler">
+        Bugzilla 50987: Fixed an issue in PDF output where a link was added to the parent tree 
+        instead of the related structure element.
+      </action>
+      <action context="Renderers" dev="AD" type="fix" fixes-bug="50986" due-to="Martin Koegler">
+        Bugzilla 50986: Fixed an issue where invalid PDF page content was generated due to 
+        incorrect ET/EMC sequences.
+      </action>
+      <action context="Code" dev="AD" type="fix" fixes-bug="50593">
+        Fixed regression introduced by Bugzilla 50593: bookmarks pointing to a non-existing
+        internal destination should just trigger a warning.
+      </action>
+      <action context="Layout" dev="AD" type="fix" fixes-bug="50965" due-to="Martin Koegler">
+        Bugzilla 50965: Fixed a regression in BlockContainerLayoutManager where margins were
+        no longer reset after forced breaks.
+      </action>
+      <action context="Layout" dev="VH" type="fix" fixex-bug="50763">
+        Implemented non-standard behavior for basic-link areas, such that they take into account the 
+        heights of their descendants areas.
+      </action>
+      <action context="Layout" dev="VH" type="fix">
+        Bugfix: keep-together does not apply to fo:table-cell.
+      </action>
+      <action context="Layout" dev="VH" type="fix">
+        Bugfix: keep-together on a table containing row-spanning cells was not honored.
+      </action>
+      <action context="Layout" dev="VH" type="fix" fixes-bug="50196" due-to="Matthias Reischenbacher">
+        Bugzilla #50196: padding-start ignored when table-header/footer is repeated.
+      </action>
+      <action context="Renderers" dev="JM" type="fix">
+        Increased maximum possible PDF size from 2GB to around 9GB (hard maximum imposed by the PDF specification).
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        Added support for CIE Lab colors (from XSL-FO 2.0 WD).
+      </action>
+      <action context="Renderers" dev="JM" type="add" fixes-bug="49403" due-to="Patrick Jaromin">
+        Initial work on spot colors (aka named colors) for PDF output.
+      </action>
+      <action context="Renderers" dev="JM" type="fix" fixes-bug="50705" due-to="Mehdi Houshmand">
+        Fix to preserve the order of AFP TLEs and NOPs as given in the XSL-FO document.
+      </action>
+      <action context="Fonts" dev="JM" type="add" fixes-bug="50699" due-to="Alexandros Papadakis">
+        Added support for lookup of alternative glyphs when additional single-byte encodings are
+        used, ex. replacing "Omegagreek" by "Omega" and vice versa.
+      </action>
+      <action context="Code" dev="AD" type="add" fixes-bug="48334">
+        Added support for resolution of relative URIs against a specified xml:base during
+        property refinement.
+      </action>
+      <action context="Renderers" dev="JM" type="add">
+        Allow afp:no-operation to also appear under fo:page-sequence and fo:declarations.
+      </action>
+      <action context="Code" dev="AD" type="fix" fixes-bug="50635" due-to="mkoegler.AT.auto.tuwien.ac.at">
+        Bugfix: fix issue in RenderPagesModel.checkPreparedPages() where the same page-sequence
+        is potentially started multiple times.
+      </action>
+      <action context="Code" dev="AD" type="fix" fixes-bug="50636" due-to="mkoegler.AT.auto.tuwien.ac.at">
+        Bugfix: fix performance issue when adding pages, if the total number of pages
+        is significantly large.
+      </action>
+      <action context="Code" dev="AD" type="fix" fixes-bug="50626" due-to="mkoegler.AT.auto.tuwien.ac.at">
+        Bugfix: fix performance issue when adding nodes, if the number of children
+        is significantly large.
+      </action>
+	  <action context="Config" dev="SP" type="fix">
+		Bugfix: relative URIs in the configuration file (base, font-base, hyphenation-base) are evaluated relative to the base URI of the configuration file.
+	  </action>
+      <action context="Layout" dev="AD" type="fix" fixes-bug="49848">
+        Bugfix: correct behavior of keep-together.within-line in case there are nested inlines
+      </action>
+      <action context="Code" dev="AD" type="fix" fixes-bug="50471">
+        Bugfix: avoid ArrayIndexOutOfBoundsException for codepoints without a linebreak class
+      </action>
+      <action context="Layout" dev="AD" type="fix" fixes-bug="48380">
+        Bugfix: avoid ClassCastException when using fox:widow-content-limit
+      </action>
+      <action context="Layout" dev="VH" type="fix" fixes-bug="50089">
+        Bugfix: content after forced break in block-container is not rendered.
+      </action>
+      <action context="Layout" dev="JM" type="fix" fixes-bug="42034">
+        Fixed adjustment of inline parent area for justified text containing a forward page reference.
+      </action>
       <action context="Layout" dev="AD" type="fix" fixes-bug="38264">
         Fixed behavior when combining hyphenation with preserved linefeeds or whitespace.
       </action>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_bad.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_bad.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_bad.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_bad.xconf Thu Apr  5 16:19:19 2012
@@ -16,7 +16,7 @@
     <renderer mime="application/pdf">
       <fonts>
 		<!-- this font has an embed-url that does not exist on filesystem -->
-		<font metrics-url="test/resources/fonts/glb12.ttf.xml" embed-url="test/resources/fonts/doesnotexist.ttf">
+		<font metrics-url="test/resources/fonts/ttf/glb12.ttf.xml" embed-url="test/resources/fonts/ttf/doesnotexist.ttf">
           <font-triplet name="Gladiator-Ansi" style="normal" weight="normal"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_malformed.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_malformed.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_malformed.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_embedurl_malformed.xconf Thu Apr  5 16:19:19 2012
@@ -16,7 +16,7 @@
     <renderer mime="application/pdf">
       <fonts>
 		<!-- this font has a malformed embed-url -->
-		<font metrics-url="test/resources/fonts/glb12.ttf.xml" embed-url="badprotocol:test/resources/fonts/glb12.ttf">
+		<font metrics-url="test/resources/fonts/ttf/glb12.ttf.xml" embed-url="badprotocol:test/resources/fonts/ttf/glb12.ttf">
           <font-triplet name="Gladiator-Ansi" style="normal" weight="normal"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_bad.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_bad.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_bad.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_bad.xconf Thu Apr  5 16:19:19 2012
@@ -16,7 +16,7 @@
     <renderer mime="application/pdf">
       <fonts>
 		<!-- this font has a metrics-url that does not exist on filesystem -->
-        <font metrics-url="test/resources/fonts/doesnotexist.ttf.ansi.xml">
+        <font metrics-url="test/resources/fonts/ttf/doesnotexist.ttf.ansi.xml">
           <font-triplet name="Gladiator-Ansi" style="normal" weight="normal"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_malformed.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_malformed.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_malformed.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_metricsurl_malformed.xconf Thu Apr  5 16:19:19 2012
@@ -16,7 +16,7 @@
     <renderer mime="application/pdf">
       <fonts>
 		<!-- this font has a malformed metrics-url -->
-        <font metrics-url="badprotocol:test/resources/fonts/glb12.ttf.xml">
+        <font metrics-url="badprotocol:test/resources/fonts/ttf/glb12.ttf.xml">
           <font-triplet name="Gladiator" style="normal" weight="normal"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_tripletattribute_missing.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_tripletattribute_missing.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_tripletattribute_missing.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_font_tripletattribute_missing.xconf Thu Apr  5 16:19:19 2012
@@ -15,7 +15,7 @@
   <renderers>
     <renderer mime="application/pdf">
       <fonts>
-        <font metrics-url="test/resources/fonts/glb12.ttf.xml">
+        <font metrics-url="test/resources/fonts/ttf/glb12.ttf.xml">
 		  <!-- this font-triplet has a missing style attribute -->           
           <font-triplet name="Gladiator" weight="normal"/>
         </font>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fontbase_bad.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fontbase_bad.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fontbase_bad.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fontbase_bad.xconf Thu Apr  5 16:19:19 2012
@@ -17,7 +17,7 @@
       <fonts>
 		<!-- this font is with a relative metrics-url
 		     so should call upon the bad font-base -->
-        <font metrics-url="test/resources/fonts/glb12.ttf.xml" embed-url="test/resources/fonts/glb12.ttf">
+        <font metrics-url="test/resources/fonts/ttf/glb12.ttf.xml" embed-url="test/resources/fonts/ttf/glb12.ttf">
           <font-triplet name="Gladiator" style="normal" weight="normal"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fonts_substitution.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fonts_substitution.xconf?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fonts_substitution.xconf (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/config/test_fonts_substitution.xconf Thu Apr  5 16:19:19 2012
@@ -24,7 +24,7 @@
   <renderers>
     <renderer mime="application/pdf">
       <fonts>
-        <font metrics-url="test/resources/fonts/glb12.ttf.xml" embed-url="test/resources/fonts/glb12.ttf">
+        <font metrics-url="test/resources/fonts/ttf/glb12.ttf.xml" embed-url="test/resources/fonts/ttf/glb12.ttf">
           <font-triplet name="Gladiator" style="normal" weight="bold"/>
         </font>
       </fonts>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/events/font.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/events/font.fo?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/events/font.fo (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/events/font.fo Thu Apr  5 16:19:19 2012
@@ -1,14 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
-  <fo:layout-master-set>
-    <fo:simple-page-master master-name="page"
-      page-height="420pt" page-width="320pt" margin="10pt">
-      <fo:region-body background-color="#F0F0F0"/>
-    </fo:simple-page-master>
-  </fo:layout-master-set>
-  <fo:page-sequence master-reference="page">
-    <fo:flow flow-name="xsl-region-body">
-      <fo:block font-family="blah">This block uses an unknown font.</fo:block>
-    </fo:flow>
-  </fo:page-sequence>
-</fo:root>

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 
 import javax.xml.transform.Result;
@@ -34,26 +36,21 @@ import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.cli.InputHandler;
+import org.junit.Test;
 
 /**
  * Basic runtime test for the old Fop class. It is used to verify that
  * nothing obvious is broken after compiling.
  */
-public class BasicDriverTestCase extends AbstractFOPTestCase {
+public class BasicDriverTestCase extends AbstractFOPTest {
 
     private FopFactory fopFactory = FopFactory.newInstance();
 
     /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicDriverTestCase(String name) {
-        super(name);
-    }
-
-    /**
      * Tests Fop with JAXP and OutputStream generating PDF.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PDFWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -73,6 +70,7 @@ public class BasicDriverTestCase extends
      * Tests Fop with JAXP and OutputStream generating PostScript.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PSWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -92,6 +90,7 @@ public class BasicDriverTestCase extends
      * Tests Fop with JAXP and OutputStream generating RTF.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2RTFWithJAXP() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
@@ -111,6 +110,7 @@ public class BasicDriverTestCase extends
      * Tests Fop with XsltInputHandler and OutputStream.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO2PDFWithXSLTInputHandler() throws Exception {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         File xmlFile = new File(getBaseDir(), "test/xml/1.xml");

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestSuite.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicDriverTestSuite.java Thu Apr  5 16:19:19 2012
@@ -19,24 +19,14 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for basic functionality of FOP's Driver API.
  */
+@RunWith(Suite.class)
+@SuiteClasses({ BasicDriverTestCase.class })
 public class BasicDriverTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Basic functionality test suite for FOP's Driver API");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(BasicDriverTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java Thu Apr  5 16:19:19 2012
@@ -26,18 +26,9 @@ import org.apache.fop.svg.PDFTranscoder;
  * Basic runtime test for the PDF transcoder. It is used to verify that
  * nothing obvious is broken after compiling.
  */
-public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTestCase {
+public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTest {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicPDFTranscoderTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.AbstractBasicTranscoderTestCase#createTranscoder()
-     */
+    @Override
     protected Transcoder createTranscoder() {
         return new PDFTranscoder();
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPSTranscoderTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPSTranscoderTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicPSTranscoderTestCase.java Thu Apr  5 16:19:19 2012
@@ -26,18 +26,9 @@ import org.apache.fop.render.ps.PSTransc
  * Basic runtime test for the PS transcoder. It is used to verify that
  * nothing obvious is broken after compiling.
  */
-public class BasicPSTranscoderTestCase extends AbstractBasicTranscoderTestCase {
+public class BasicPSTranscoderTestCase extends AbstractBasicTranscoderTest {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public BasicPSTranscoderTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.AbstractBasicTranscoderTestCase#createTranscoder()
-     */
+    @Override
     protected Transcoder createTranscoder() {
         return new PSTranscoder();
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicTranscoderTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicTranscoderTestSuite.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicTranscoderTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/BasicTranscoderTestSuite.java Thu Apr  5 16:19:19 2012
@@ -19,25 +19,17 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 /**
  * Test suite for basic functionality of FOP's transcoders.
  */
+@RunWith(Suite.class)
+@SuiteClasses({
+    BasicPDFTranscoderTestCase.class,
+    BasicPSTranscoderTestCase.class
+})
 public class BasicTranscoderTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Basic functionality test suite for FOP's transcoders");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(BasicPDFTranscoderTestCase.class));
-        suite.addTest(new TestSuite(BasicPSTranscoderTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/DigestFilterTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/DigestFilterTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/DigestFilterTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/DigestFilterTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.IOException;
 import java.io.StringReader;
 import java.security.NoSuchAlgorithmException;
@@ -26,9 +28,9 @@ import java.security.NoSuchAlgorithmExce
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
 
-import junit.framework.TestCase;
-
 import org.apache.fop.util.DigestFilter;
+import org.junit.Before;
+import org.junit.Test;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
@@ -37,12 +39,12 @@ import org.xml.sax.XMLReader;
  * Test case for digesting SAX filter.
  *
  */
-public class DigestFilterTestCase extends TestCase {
+public class DigestFilterTestCase {
 
     private SAXParserFactory parserFactory;
 
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() {
+    @Before
+    public void setUp() {
         parserFactory = SAXParserFactory.newInstance();
         parserFactory.setNamespaceAware(true);
     }
@@ -95,6 +97,7 @@ public class DigestFilterTestCase extend
         return digestFilter.getDigestValue();
     }
 
+    @Test
     public final void testLineFeed()
         throws
             NoSuchAlgorithmException,
@@ -111,6 +114,7 @@ public class DigestFilterTestCase extend
             compareDigest(lfDigest, crlfDigest));
     }
 
+    @Test
     public final void testAttributeOrder()
         throws
             NoSuchAlgorithmException,
@@ -134,6 +138,7 @@ public class DigestFilterTestCase extend
             compareDigest(sortDigest, reverseDigest));
     }
 
+    @Test
     public final void testNamespacePrefix()
         throws
             NoSuchAlgorithmException,

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/KnuthAlgorithmTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/KnuthAlgorithmTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/KnuthAlgorithmTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,6 +19,8 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.List;
 
 import org.apache.fop.layoutmgr.BlockKnuthSequence;
@@ -28,17 +30,16 @@ import org.apache.fop.layoutmgr.KnuthBox
 import org.apache.fop.layoutmgr.KnuthGlue;
 import org.apache.fop.layoutmgr.KnuthPenalty;
 import org.apache.fop.layoutmgr.KnuthSequence;
-
-import junit.framework.TestCase;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Tests the Knuth algorithm implementation.
  */
-public class KnuthAlgorithmTestCase extends TestCase {
+public class KnuthAlgorithmTestCase {
 
-    /** @see junit.framework.TestCase#setUp() */
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() {
         DebugHelper.registerStandardElementListObservers();
     }
 
@@ -67,6 +68,7 @@ public class KnuthAlgorithmTestCase exte
      * possibility.
      * @throws Exception if an error occurs
      */
+    @Test
     public void test1() throws Exception {
         MyBreakingAlgorithm algo = new MyBreakingAlgorithm(0, 0, true, true, 0);
         algo.setConstantLineWidth(30000);

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/StandardTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/StandardTestSuite.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/StandardTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/StandardTestSuite.java Thu Apr  5 16:19:19 2012
@@ -19,49 +19,67 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
-import org.apache.fop.fonts.DejaVuLGCSerifTest;
+import org.apache.fop.afp.fonts.CharactersetEncoderTestCase;
+import org.apache.fop.afp.parser.MODCAParserTestCase;
+import org.apache.fop.area.ViewportTestSuite;
+import org.apache.fop.fonts.DejaVuLGCSerifTestCase;
+import org.apache.fop.fonts.FontEventProcessingTestCase;
+import org.apache.fop.fonts.truetype.GlyfTableTestCase;
+import org.apache.fop.fonts.type1.AFMParserTestCase;
+import org.apache.fop.fonts.type1.AdobeStandardEncodingTestCase;
 import org.apache.fop.image.loader.batik.ImageLoaderTestCase;
 import org.apache.fop.image.loader.batik.ImagePreloaderTestCase;
 import org.apache.fop.intermediate.IFMimickingTestCase;
-import org.apache.fop.render.extensions.prepress.PageBoundariesTest;
-import org.apache.fop.render.extensions.prepress.PageScaleTest;
+import org.apache.fop.layoutmgr.PageSequenceLayoutManagerTestCase;
+import org.apache.fop.pdf.PDFLibraryTestSuite;
+import org.apache.fop.render.extensions.prepress.PageBoundariesTestCase;
+import org.apache.fop.render.extensions.prepress.PageScaleTestCase;
 import org.apache.fop.render.pdf.PDFAConformanceTestCase;
 import org.apache.fop.render.pdf.PDFCMapTestCase;
 import org.apache.fop.render.pdf.PDFEncodingTestCase;
 import org.apache.fop.render.pdf.PDFsRGBSettingsTestCase;
+import org.apache.fop.render.pdf.RenderPDFTestSuite;
+import org.apache.fop.render.ps.PSTestSuite;
 import org.apache.fop.render.rtf.RichTextFormatTestSuite;
-import org.apache.fop.traits.MinOptMaxTest;
+import org.apache.fop.traits.MinOptMaxTestCase;
 
 /**
  * Test suite for basic functionality of FOP.
  */
+@RunWith(Suite.class)
+@SuiteClasses({
+        BasicDriverTestSuite.class,
+        UtilityCodeTestSuite.class,
+        PDFAConformanceTestCase.class,
+        PDFEncodingTestCase.class,
+        PDFCMapTestCase.class,
+        PDFsRGBSettingsTestCase.class,
+        DejaVuLGCSerifTestCase.class,
+        RichTextFormatTestSuite.class,
+        ImageLoaderTestCase.class,
+        ImagePreloaderTestCase.class,
+        IFMimickingTestCase.class,
+        PageSequenceLayoutManagerTestCase.class,
+        PageBoundariesTestCase.class,
+        PageScaleTestCase.class,
+        org.apache.fop.afp.AFPTestSuite.class,
+        GlyfTableTestCase.class,
+        ViewportTestSuite.class,
+        RenderPDFTestSuite.class,
+        MODCAParserTestCase.class,
+        CharactersetEncoderTestCase.class,
+        org.apache.fop.render.afp.AFPTestSuite.class,
+        PDFLibraryTestSuite.class,
+        PSTestSuite.class,
+        MinOptMaxTestCase.class,
+        AdobeStandardEncodingTestCase.class,
+        AFMParserTestCase.class,
+        FontEventProcessingTestCase.class,
+        org.apache.fop.render.intermediate.IFStructureTreeBuilderTestCase.class
+})
 public class StandardTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite("Basic functionality test suite for FOP");
-        //$JUnit-BEGIN$
-        suite.addTest(BasicDriverTestSuite.suite());
-        suite.addTest(UtilityCodeTestSuite.suite());
-        suite.addTest(new TestSuite(PDFAConformanceTestCase.class));
-        suite.addTest(new TestSuite(PDFEncodingTestCase.class));
-        suite.addTest(new TestSuite(PDFCMapTestCase.class));
-        suite.addTest(new TestSuite(PDFsRGBSettingsTestCase.class));
-        suite.addTest(new TestSuite(DejaVuLGCSerifTest.class));
-        suite.addTest(RichTextFormatTestSuite.suite());
-        suite.addTest(new TestSuite(ImageLoaderTestCase.class));
-        suite.addTest(new TestSuite(ImagePreloaderTestCase.class));
-        suite.addTest(new TestSuite(IFMimickingTestCase.class));
-        suite.addTest(new TestSuite(PageBoundariesTest.class));
-        suite.addTest(new TestSuite(PageScaleTest.class));
-        suite.addTest(new TestSuite(MinOptMaxTest.class));
-        //$JUnit-END$
-        return suite;
-    }
 }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/URIResolutionTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/URIResolutionTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/URIResolutionTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/URIResolutionTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,6 +19,9 @@
 
 package org.apache.fop;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.OutputStream;
@@ -36,6 +39,8 @@ import javax.xml.transform.sax.Transform
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.w3c.dom.Document;
 
 import org.apache.commons.io.IOUtils;
@@ -53,7 +58,7 @@ import org.apache.fop.render.xml.XMLRend
 /**
  * Tests URI resolution facilities.
  */
-public class URIResolutionTestCase extends AbstractFOPTestCase {
+public class URIResolutionTestCase extends AbstractFOPTest {
 
     // configure fopFactory as desired
     private FopFactory fopFactory = FopFactory.newInstance();
@@ -61,11 +66,10 @@ public class URIResolutionTestCase exten
     private SAXTransformerFactory tfactory
             = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
 
-    private File backupDir = new File(getBaseDir(), "build/test-results");
+    private final static File backupDir = new File(getBaseDir(), "build/test-results");
 
-    /** @see junit.framework.TestCase#TestCase(String) */
-    public URIResolutionTestCase(String name) {
-        super(name);
+    @BeforeClass
+    public static void makeDirs() {
         backupDir.mkdirs();
     }
 
@@ -73,6 +77,7 @@ public class URIResolutionTestCase exten
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO1a() throws Exception {
         innerTestFO1(false);
     }
@@ -81,6 +86,7 @@ public class URIResolutionTestCase exten
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
+    @Test
     public void testFO1b() throws Exception {
         innerTestFO1(true);
     }
@@ -112,7 +118,8 @@ public class URIResolutionTestCase exten
      * Test custom URI resolution with a hand-written URIResolver.
      * @throws Exception if anything fails
      */
-    public void DISABLEDtestFO2() throws Exception {
+    @Test
+    public void testFO2() throws Exception {
         //TODO This will only work when we can do URI resolution inside Batik!
         File foFile = new File(getBaseDir(), "test/xml/uri-resolution2.fo");
 
@@ -155,8 +162,7 @@ public class URIResolutionTestCase exten
         TransformerHandler athandler = tfactory.newTransformerHandler();
         athandler.setResult(domres);
 
-        XMLRenderer atrenderer = new XMLRenderer();
-        atrenderer.setUserAgent(ua);
+        XMLRenderer atrenderer = new XMLRenderer(ua);
         atrenderer.setContentHandler(athandler);
         ua.setRendererOverride(atrenderer);
 

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/UtilityCodeTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/UtilityCodeTestSuite.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/UtilityCodeTestSuite.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/UtilityCodeTestSuite.java Thu Apr  5 16:19:19 2012
@@ -19,41 +19,43 @@
 
 package org.apache.fop;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
 
 import org.apache.fop.events.BasicEventTestCase;
+import org.apache.fop.pdf.FileIDGeneratorTestCase;
+import org.apache.fop.pdf.PDFDocumentGraphics2DTestCase;
+import org.apache.fop.pdf.PDFEncryptionJCETestCase;
+import org.apache.fop.pdf.PDFFactoryTestCase;
+import org.apache.fop.pdf.PDFNumberTestCase;
 import org.apache.fop.pdf.PDFObjectTestCase;
 import org.apache.fop.traits.BorderPropsTestCase;
+import org.apache.fop.util.BitmapImageUtilTestCase;
 import org.apache.fop.util.ColorUtilTestCase;
 import org.apache.fop.util.ElementListUtilsTestCase;
 import org.apache.fop.util.HexEncoderTestCase;
-import org.apache.fop.util.PDFNumberTestCase;
 import org.apache.fop.util.XMLResourceBundleTestCase;
 
 /**
  * Test suite for FOP's utility classes.
  */
+@RunWith(Suite.class)
+@SuiteClasses({
+    ColorUtilTestCase.class,
+    BorderPropsTestCase.class,
+    ElementListUtilsTestCase.class,
+    BasicEventTestCase.class,
+    XMLResourceBundleTestCase.class,
+    URIResolutionTestCase.class,
+    FileIDGeneratorTestCase.class,
+    PDFFactoryTestCase.class,
+    PDFEncryptionJCETestCase.class,
+    BitmapImageUtilTestCase.class,
+    PDFDocumentGraphics2DTestCase.class,
+    PDFNumberTestCase.class,
+    PDFObjectTestCase.class,
+    HexEncoderTestCase.class
+})
 public class UtilityCodeTestSuite {
-
-    /**
-     * Builds the test suite
-     * @return the test suite
-     */
-    public static Test suite() {
-        TestSuite suite = new TestSuite(
-            "Test suite for FOP's utility classes");
-        //$JUnit-BEGIN$
-        suite.addTest(new TestSuite(PDFNumberTestCase.class));
-        suite.addTest(new TestSuite(PDFObjectTestCase.class));
-        suite.addTest(new TestSuite(ColorUtilTestCase.class));
-        suite.addTest(new TestSuite(BorderPropsTestCase.class));
-        suite.addTest(new TestSuite(ElementListUtilsTestCase.class));
-        suite.addTest(new TestSuite(BasicEventTestCase.class));
-        suite.addTest(new TestSuite(XMLResourceBundleTestCase.class));
-        suite.addTest(new TestSuite(URIResolutionTestCase.class));
-        suite.addTest(new TestSuite(HexEncoderTestCase.class));
-        //$JUnit-END$
-        return suite;
-    }
 }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FOURIResolverTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FOURIResolverTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FOURIResolverTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FOURIResolverTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,21 +19,23 @@
 
 package org.apache.fop.config;
 
-import java.net.MalformedURLException;
+import static org.junit.Assert.fail;
 
-import junit.framework.TestCase;
+import java.net.MalformedURLException;
 
 import org.apache.fop.apps.FOURIResolver;
+import org.junit.Test;
 
 /**
  * This tests some aspects of the {@link FOURIResolver} class.
  */
-public class FOURIResolverTestCase extends TestCase {
+public class FOURIResolverTestCase {
 
     /**
      * Checks the {@link FOURIResolver#checkBaseURL(String)} method.
      * @throws Exception if an error occurs
      */
+    @Test
     public void testCheckBaseURI() throws Exception {
         FOURIResolver resolver = new FOURIResolver(true);
         System.out.println(resolver.checkBaseURL("./test/config"));

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font is without a metrics-url or an embed-url
  */
-public class FontAttributesMissingTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontAttributesMissingTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontAttributesMissingTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_attributes_missing.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontBaseBadTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontBaseBadTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontBaseBadTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontBaseBadTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,16 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * This font base does not exist and a relative font path is used.
  */
-public class FontBaseBadTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontBaseBadTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontBaseBadTestCase(String name) {
-        super(name);
-    }
-
-    /** {@inheritDoc} */
+    @Override
     public String getUserConfigFilename() {
         return "test_fontbase_bad.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java Thu Apr  5 16:19:19 2012
@@ -22,15 +22,9 @@ package org.apache.fop.config;
 /**
  * this font has an embed-url that does not exist on filesystem.
  */
-public class FontEmbedUrlBadTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontEmbedUrlBadTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontEmbedUrlBadTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_embedurl_bad.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java Thu Apr  5 16:19:19 2012
@@ -22,15 +22,9 @@ package org.apache.fop.config;
 /**
  * this font has a malformed embed-url
  */
-public class FontEmbedUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontEmbedUrlMalformedTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontEmbedUrlMalformedTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_embedurl_malformed.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,21 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a metrics-url that does not exist on filesystem
  */
-public class FontMetricsUrlBadTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontMetricsUrlBadTestCase extends BaseDestructiveUserConfigTest {
 
-    /**
-     * @see junit.framework.TestCase#TestCase(String)
-     */
-    public FontMetricsUrlBadTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_metricsurl_bad.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a malformed metrics-url
  */
-public class FontMetricsUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontMetricsUrlMalformedTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontMetricsUrlMalformedTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_metricsurl_malformed.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,18 +19,12 @@
 
 package org.apache.fop.config;
 
-/*
+/**
  * this font has a missing font triplet attribute
  */
-public class FontTripletAttributeMissingTestCase extends BaseDestructiveUserConfigTestCase {
+public class FontTripletAttributeMissingTestCase extends BaseDestructiveUserConfigTest {
 
-    public FontTripletAttributeMissingTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_font_tripletattribute_missing.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java Thu Apr  5 16:19:19 2012
@@ -19,15 +19,9 @@
 
 package org.apache.fop.config;
 
-public class FontsAutoDetectTestCase extends BaseConstructiveUserConfigTestCase {
+public class FontsAutoDetectTestCase extends BaseConstructiveUserConfigTest {
 
-    public FontsAutoDetectTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_fonts_autodetect.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java Thu Apr  5 16:19:19 2012
@@ -22,15 +22,9 @@ package org.apache.fop.config;
 /**
  * tests font directory on system
  */
-public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigTestCase {
+public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigTest {
 
-    public FontsDirectoryRecursiveTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
-     */
+    @Override
     protected String getUserConfigFilename() {
         return "test_fonts_directory_recursive.xconf";
     }

Modified: xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java?rev=1309921&r1=1309920&r2=1309921&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java (original)
+++ xmlgraphics/fop/branches/Temp_TrueTypeInPostScript/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java Thu Apr  5 16:19:19 2012
@@ -36,19 +36,9 @@ import org.apache.fop.render.PrintRender
  * Tests the font substitution mechanism
  */
 public class FontsSubstitutionTestCase extends
-        BaseConstructiveUserConfigTestCase {
+        BaseConstructiveUserConfigTest {
 
-    /**
-     * Main constructor
-     * @param name test case name
-     */
-    public FontsSubstitutionTestCase(String name) {
-        super(name);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     protected byte[] convertFO(File foFile, FOUserAgent ua, boolean dumpPdfFile)
             throws Exception {
         PrintRenderer renderer = (PrintRenderer) ua.getRendererFactory()
@@ -58,7 +48,8 @@ public class FontsSubstitutionTestCase e
         FontManager fontManager = ua.getFactory().getFontManager();
         FontCollection[] fontCollections = new FontCollection[] {
                 new Base14FontCollection(fontManager.isBase14KerningEnabled()),
-                new CustomFontCollection(renderer.getFontResolver(), renderer.getFontList())
+                new CustomFontCollection(renderer.getFontResolver(), renderer.getFontList(),
+                                         ua.isComplexScriptFeaturesEnabled())
         };
         fontManager.setup(fontInfo, fontCollections);
         FontTriplet triplet = new FontTriplet("Times", "italic",
@@ -72,9 +63,7 @@ public class FontsSubstitutionTestCase e
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
+    @Override
     public String getUserConfigFilename() {
         return "test_fonts_substitution.xconf";
     }



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