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 je...@apache.org on 2006/03/16 14:51:17 UTC

svn commit: r386327 [3/3] - in /xmlgraphics/fop/trunk: ./ src/codegen/ src/java/org/apache/fop/apps/ src/java/org/apache/fop/area/ src/java/org/apache/fop/area/inline/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/layoutmgr/inline/ src/java/or...

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java Thu Mar 16 05:51:14 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,18 +45,19 @@
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.area.Trait;
 import org.apache.fop.area.inline.AbstractTextArea;
-import org.apache.fop.area.inline.Character;
 import org.apache.fop.area.inline.ForeignObject;
 import org.apache.fop.area.inline.Image;
 import org.apache.fop.area.inline.InlineParent;
 import org.apache.fop.area.inline.Leader;
+import org.apache.fop.area.inline.SpaceArea;
 import org.apache.fop.area.inline.TextArea;
+import org.apache.fop.area.inline.WordArea;
 import org.apache.fop.datatypes.ColorType;
 import org.apache.fop.apps.FOUserAgent;
 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.FontTriplet;
 import org.apache.fop.fonts.Typeface;
 import org.apache.fop.image.EPSImage;
 import org.apache.fop.image.FopImage;
@@ -233,6 +234,16 @@
         writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " M");
     }
     
+    /**
+     * Moves the current point by (x, y) relative to the current position, 
+     * omitting any connecting line segment. 
+     * @param x x coordinate
+     * @param y y coordinate
+     */
+    protected void rmoveTo(float x, float y) {
+        writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " RM");
+    }
+    
     /** @see org.apache.fop.render.AbstractPathOrientedRenderer#lineTo(float, float) */
     protected void lineTo(float x, float y) {
         writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " lineto");
@@ -310,7 +321,9 @@
         }
     }
 
-    public void paintImage(RenderedImage image, RendererContext context, int x, int y, int width, int height) throws IOException {
+    /** @see org.apache.fop.render.ImageAdapter */
+    public void paintImage(RenderedImage image, RendererContext context, 
+            int x, int y, int width, int height) throws IOException {
         float fx = (float)x / 1000f;
         x += currentIPPosition / 1000f;
         float fy = (float)y / 1000f;
@@ -822,24 +835,9 @@
     }
 
     /**
-     * @see org.apache.fop.render.AbstractRenderer#renderCharacter(Character)
-     */
-    public void renderCharacter(Character ch) {
-        String text = ch.getChar();
-        renderText(ch, text);
-        super.renderCharacter(ch); //Updates IPD
-    }
-
-    /**
      * @see org.apache.fop.render.AbstractRenderer#renderText(TextArea)
      */
     public void renderText(TextArea area) {
-        String text = area.getText();
-        renderText(area, text);
-        super.renderText(area); //Updates IPD
-    }
-    
-    private void renderText(AbstractTextArea area, String text) {
         renderInlineAreaBackAndBorders(area);
         String fontname = getInternalFontNameForArea(area);
         int fontsize = area.getTraitAsInteger(Trait.FONT_SIZE);
@@ -861,24 +859,52 @@
             }
         }
         
-        boolean kerningAvailable = false;
-        Map kerning = tf.getKerningInfo();
-        if (kerning != null && !kerning.isEmpty()) {
-            //kerningAvailable = true;
-            //TODO Fix me when kerning is supported by the layout engine
-            log.warn("Kerning info is available, but kerning is not yet implemented for"
-                    + " the PS renderer and not currently supported by the layout engine.");
-        }
-        
         beginTextObject();
         writeln("1 0 0 -1 " + gen.formatDouble(rx / 1000f) 
                 + " " + gen.formatDouble(bl / 1000f) + " Tm");
+        
+        super.renderText(area); //Updates IPD
+
+        renderTextDecoration(tf, fontsize, area, bl, rx);
+    }
+    
+    /**
+     * @see org.apache.fop.render.AbstractRenderer#renderWord(org.apache.fop.area.inline.WordArea)
+     */
+    protected void renderWord(WordArea word) {
+        renderText((TextArea)word.getParentArea(), word.getWord(), word.getLetterAdjustArray());
+        super.renderWord(word);
+    }
+
+    /**
+     * @see org.apache.fop.render.AbstractRenderer#renderSpace(org.apache.fop.area.inline.SpaceArea)
+     */
+    protected void renderSpace(SpaceArea space) {
+        AbstractTextArea textArea = (AbstractTextArea)space.getParentArea();
+        String s = space.getSpace();
+        char sp = s.charAt(0);
+        Font font = getFontFromArea(textArea);
+        
+        int tws = (space.isAdjustable() 
+                ? ((TextArea) space.getParentArea()).getTextWordSpaceAdjust() 
+                        + 2 * textArea.getTextLetterSpaceAdjust()
+                : 0);
+
+        rmoveTo((font.getCharWidth(sp) + tws) / 1000f, 0);
+        super.renderSpace(space);
+    }
+
+    private void renderText(AbstractTextArea area, String text, int[] letterAdjust) {
+        Font font = getFontFromArea(area);
+        Typeface tf = (Typeface) fontInfo.getFonts().get(font.getFontName());
 
         int initialSize = text.length();
         initialSize += initialSize / 2;
         StringBuffer sb = new StringBuffer(initialSize);
         int textLen = text.length();
-        if (area.getTextLetterSpaceAdjust() == 0 && area.getTextWordSpaceAdjust() == 0) {
+        if (letterAdjust == null 
+                && area.getTextLetterSpaceAdjust() == 0 
+                && area.getTextWordSpaceAdjust() == 0) {
             sb.append("(");
             for (int i = 0; i < textLen; i++) {
                 final char c = text.charAt(i);
@@ -893,17 +919,16 @@
                 final char c = text.charAt(i);
                 final char mapped = tf.mapChar(c);
                 int wordSpace;
-                //TODO Synchronize word space behaviour with TextLayoutManager
-                //Check the other renderers, too!
-                if (CharUtilities.isAnySpace(mapped)
-                        && mapped != CharUtilities.ZERO_WIDTH_SPACE
-                        && mapped != CharUtilities.ZERO_WIDTH_NOBREAK_SPACE) {
+
+                if (CharUtilities.isAdjustableSpace(mapped)) {
                     wordSpace = area.getTextWordSpaceAdjust();
                 } else {
                     wordSpace = 0;
                 }
-                int cw = tf.getWidth(mapped, fontsize) / 1000;
-                offsets[i] = cw + area.getTextLetterSpaceAdjust() + wordSpace;
+                int cw = tf.getWidth(mapped, font.getFontSize()) / 1000;
+                int ladj = (letterAdjust != null && i < textLen - 1 ? letterAdjust[i + 1] : 0);
+                int tls = (i < textLen - 1 ? area.getTextLetterSpaceAdjust() : 0); 
+                offsets[i] = cw + ladj + tls + wordSpace;
                 PSGenerator.escapeChar(mapped, sb);
             }
             sb.append(")" + PSGenerator.LF + "[");
@@ -921,7 +946,6 @@
         }
         writeln(sb.toString());
 
-        renderTextDecoration(tf, fontsize, area, bl, rx);
     }
 
     /** @see org.apache.fop.render.AbstractPathOrientedRenderer#breakOutOfStateStack() */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java Thu Mar 16 05:51:14 2006
@@ -66,6 +66,7 @@
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.FOText;
+import org.apache.fop.render.DefaultFontResolver;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfAfterContainer;
 import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfBeforeContainer;
@@ -137,7 +138,7 @@
         this.os = os;
         bDefer = true;
 
-        FontSetup.setup(fontInfo, null, userAgent);
+        FontSetup.setup(fontInfo, null, new DefaultFontResolver(userAgent));
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLRenderer.java Thu Mar 16 05:51:14 2006
@@ -108,6 +108,7 @@
 
     private boolean startedSequence = false;
     private RendererContext context;
+    private boolean compactFormat = false;
 
     /** If not null, the XMLRenderer will mimic another renderer by using its font setup. */
     protected Renderer mimic;
@@ -155,6 +156,10 @@
 
         XMLHandler xmlHandler = new XMLXMLHandler();
         userAgent.getXMLHandlerRegistry().addXMLHandler(xmlHandler);
+        Boolean b = (Boolean)userAgent.getRendererOptions().get("compact-format");
+        if (b != null) {
+            setCompactFormat(b.booleanValue());
+        }
     }
 
     /**
@@ -184,9 +189,12 @@
         this.handler = handler;
     }
 
-    private boolean isCoarseXml() {
-        return ((Boolean)
-            userAgent.getRendererOptions().get("fineDetail")).booleanValue();
+    public void setCompactFormat(boolean compact) {
+        this.compactFormat = compact;
+    }
+    
+    private boolean isDetailedFormat() {
+        return !this.compactFormat;
     }
 
     /**
@@ -291,16 +299,18 @@
     protected void addAreaAttributes(Area area) {
         addAttribute("ipd", area.getIPD());
         addAttribute("bpd", area.getBPD());
-        if (area.getIPD() != 0) {
-            addAttribute("ipda", area.getAllocIPD());
-        }
-        if (area.getBPD() != 0) {
-            addAttribute("bpda", area.getAllocBPD());
+        if (isDetailedFormat()) {
+            if (area.getIPD() != 0) {
+                addAttribute("ipda", area.getAllocIPD());
+            }
+            if (area.getBPD() != 0) {
+                addAttribute("bpda", area.getAllocBPD());
+            }
+            addAttribute("bap", area.getBorderAndPaddingWidthStart() + " "
+                    + area.getBorderAndPaddingWidthEnd() + " "
+                    + area.getBorderAndPaddingWidthBefore() + " "
+                    + area.getBorderAndPaddingWidthAfter());
         }
-        addAttribute("bap", area.getBorderAndPaddingWidthStart() + " "
-                + area.getBorderAndPaddingWidthEnd() + " "
-                + area.getBorderAndPaddingWidthBefore() + " "
-                + area.getBorderAndPaddingWidthAfter());
     }
 
     /**
@@ -758,20 +768,6 @@
     }
 
     /**
-     * @see org.apache.fop.render.AbstractRenderer#renderCharacter(Character)
-     */
-    protected void renderCharacter(org.apache.fop.area.inline.Character ch) {
-        atts.clear();
-        addAreaAttributes(ch);
-        addTraitAttributes(ch);
-        addAttribute("offset", ch.getOffset());
-        addAttribute("baseline", ch.getBaselineOffset());
-        startElement("char", atts);
-        characters(ch.getChar());
-        endElement("char");
-    }
-
-    /**
      * @see org.apache.fop.render.AbstractRenderer#renderInlineSpace(Space)
      */
     protected void renderInlineSpace(Space space) {
@@ -809,6 +805,21 @@
     protected void renderWord(WordArea word) {
         atts.clear();
         addAttribute("offset", word.getOffset());
+        int[] letterAdjust = word.getLetterAdjustArray(); 
+        if (letterAdjust != null) {
+            StringBuffer sb = new StringBuffer(64);
+            boolean nonZeroFound = false;
+            for (int i = 0, c = letterAdjust.length; i < c; i++) {
+                if (i > 0) {
+                    sb.append(' ');
+                }
+                sb.append(letterAdjust[i]);
+                nonZeroFound |= (letterAdjust[i] != 0);
+            }
+            if (nonZeroFound) {
+                addAttribute("letter-adjust", sb.toString());
+            }
+        }
         startElement("word", atts);
         characters(word.getWord());
         endElement("word");
@@ -821,6 +832,9 @@
     protected void renderSpace(SpaceArea space) {
         atts.clear();
         addAttribute("offset", space.getOffset());
+        if (!space.isAdjustable()) {
+            addAttribute("adj", "false"); //default is true
+        }
         startElement("space", atts);
         characters(space.getSpace());
         endElement("space");

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/MinOptMax.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/MinOptMax.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/MinOptMax.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/MinOptMax.java Thu Mar 16 05:51:14 2006
@@ -168,6 +168,11 @@
         return (min != 0 || max != 0);
     }
 
+    /** @return true if this instance allows for shrinking or stretching */
+    public boolean isElastic() {
+        return (min != opt || opt != max);
+    }
+    
     /** @see java.lang.Object#toString() */
     public String toString() {
         StringBuffer sb = new StringBuffer();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/SpaceVal.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/SpaceVal.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/SpaceVal.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/traits/SpaceVal.java Thu Mar 16 05:51:14 2006
@@ -79,6 +79,7 @@
             // and stretch by a half;
             int spaceCharIPD = fs.getCharWidth(' ');
             MinOptMax space = new MinOptMax(-spaceCharIPD / 3, 0, spaceCharIPD / 2);
+            //TODO Adding 2 letter spaces here is not 100% correct. Spaces don't have letter spacing
             return new SpaceVal(
                     MinOptMax.add
                      (space, MinOptMax.multiply(letterSpacing.getSpace(), 2)),

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CharUtilities.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CharUtilities.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CharUtilities.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CharUtilities.java Thu Mar 16 05:51:14 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2005 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,9 +53,13 @@
     public static final int XMLWHITESPACE = 4;
 
 
+    /** normal space */
+    public static final char SPACE = '\u0020';
+    /** non-breaking space */
+    public static final char NBSPACE = '\u00A0';
     /** zero-width space */
     public static final char ZERO_WIDTH_SPACE = '\u200B';
-    /** zero-width no-break space */
+    /** zero-width no-break space (= byte order mark) */
     public static final char ZERO_WIDTH_NOBREAK_SPACE = '\uFEFF';
     
     
@@ -89,22 +93,31 @@
      * @return True if the character is a normal space
      */
     public static boolean isBreakableSpace(char c) {
-        return (c == ' '
-               || (c >= '\u2000' && c <= '\u200B'));
-//         c == '\u2000'                   // en quad
-//         c == '\u2001'                   // em quad
-//         c == '\u2002'                   // en space
-//         c == '\u2003'                   // em space
-//         c == '\u2004'                   // three-per-em space
-//         c == '\u2005'                   // four--per-em space
-//         c == '\u2006'                   // six-per-em space
-//         c == '\u2007'                   // figure space
-//         c == '\u2008'                   // punctuation space
-//         c == '\u2009'                   // thin space
-//         c == '\u200A'                   // hair space
-//         c == '\u200B'                   // zero width space
+        return (c == SPACE || isFixedWidthSpace(c));
     }
-
+    
+    /**
+     * Method to determine if the character is a (breakable) fixed-width space.
+     * @param c the character to check
+     * @return true if the character has a fixed-width
+     */
+    public static boolean isFixedWidthSpace(char c) {
+        return (c >= '\u2000' && c <= '\u200B') || c == '\u3000';
+//      c == '\u2000'                   // en quad
+//      c == '\u2001'                   // em quad
+//      c == '\u2002'                   // en space
+//      c == '\u2003'                   // em space
+//      c == '\u2004'                   // three-per-em space
+//      c == '\u2005'                   // four--per-em space
+//      c == '\u2006'                   // six-per-em space
+//      c == '\u2007'                   // figure space
+//      c == '\u2008'                   // punctuation space
+//      c == '\u2009'                   // thin space
+//      c == '\u200A'                   // hair space
+//      c == '\u200B'                   // zero width space
+//      c == '\u3000'                   // ideographic space
+    }
+    
     /**
      * Method to determine if the character is a nonbreaking
      * space.
@@ -113,7 +126,7 @@
      */
     public static boolean isNonBreakableSpace(char c) {
         return
-            (c == '\u00A0'      // no-break space
+            (c == NBSPACE       // no-break space
             || c == '\u202F'    // narrow no-break space
             || c == '\u3000'    // ideographic space
             || c == ZERO_WIDTH_NOBREAK_SPACE);  // zero width no-break space
@@ -141,5 +154,30 @@
         boolean ret = (isBreakableSpace(c) || isNonBreakableSpace(c));
         return ret;
     }
+    
+    /**
+     * Indicates whether a character is classified as "Alphabetic" by the Unicode standard.
+     * @param ch the character
+     * @return true if the character is "Alphabetic"
+     */
+    public static boolean isAlphabetic(char ch) {
+        //http://www.unicode.org/Public/UNIDATA/UCD.html#Alphabetic
+        //Generated from: Other_Alphabetic + Lu + Ll + Lt + Lm + Lo + Nl
+        int generalCategory = Character.getType(ch);
+        switch (generalCategory) {
+        case Character.UPPERCASE_LETTER: //Lu
+        case Character.LOWERCASE_LETTER: //Ll
+        case Character.TITLECASE_LETTER: //Lt
+        case Character.MODIFIER_LETTER: //Lm
+        case Character.OTHER_LETTER: //Lo
+        case Character.LETTER_NUMBER: //Nl
+            return true;
+        default:
+            //TODO if (ch in Other_Alphabetic) return true; (Probably need ICU4J for that)
+            //Other_Alphabetic contains mostly more exotic characters
+            return false;
+        }
+    }
+    
 }
 

Modified: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/mif/MIFHandler.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/mif/MIFHandler.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/mif/MIFHandler.java (original)
+++ xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/mif/MIFHandler.java Thu Mar 16 05:51:14 2006
@@ -47,6 +47,7 @@
 import org.apache.fop.fo.pagination.PageSequenceMaster;
 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
@@ -80,7 +81,7 @@
     public MIFHandler(FOUserAgent ua, OutputStream os) {
         super(ua);
         outStream = os;
-        FontSetup.setup(fontInfo, null, ua);
+        FontSetup.setup(fontInfo, null, new DefaultFontResolver(ua));
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/svg/SVGRenderer.java Thu Mar 16 05:51:14 2006
@@ -401,6 +401,7 @@
     /**
      * @see org.apache.fop.render.AbstractRenderer#renderCharacter(Character)
      */
+/* deprecated
     public void renderCharacter(org.apache.fop.area.inline.Character ch) {
         Element text = SVGUtilities.createText(svgDocument,
                                                currentIPPosition / 1000,
@@ -411,6 +412,7 @@
 
         super.renderCharacter(ch);
     }
+*/
 
     /** @see org.apache.fop.render.AbstractRenderer */
     public String getMimeType() {

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/status.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Mar 16 05:51:14 2006
@@ -27,6 +27,12 @@
 
   <changes>
     <release version="FOP Trunk">
+      <action context="Code" dev="JM" type="add">
+        Added support for fixed-width spaces.
+      </action>
+      <action context="Code" dev="JM" type="add">
+        Added support for kerning.
+      </action>
       <action context="Code" dev="JM" type="fix">
         Bugfix: Fixed a copy/paste error in the table layout code that caused wrong page
         break decisions when table-headers and/or table-footers are used.

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTester.java Thu Mar 16 05:51:14 2006
@@ -19,12 +19,16 @@
 package org.apache.fop.layoutengine;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.net.MalformedURLException;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.Result;
 import javax.xml.transform.Source;
 import javax.xml.transform.Templates;
@@ -46,10 +50,14 @@
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.layoutmgr.ElementListObserver;
 import org.apache.fop.render.xml.XMLRenderer;
+import org.apache.xpath.XPathAPI;
+import org.apache.xpath.objects.XObject;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
 
 /**
  * Class for testing the FOP's layout engine using testcases specified in XML
@@ -105,11 +113,12 @@
      * Runs a single layout engine test case.
      * @param testFile Test case to run
      * @throws TransformerException In case of an XSLT/JAXP problem
-     * @throws FOPException In case of a FOP problem
-     * @throws MalformedURLException if the base URL cannot be set
+     * @throws IOException In case of an I/O problem
+     * @throws SAXException In case of a problem during SAX processing
+     * @throws ParserConfigurationException In case of a problem with the XML parser setup
      */
     public void runTest(File testFile) 
-            throws TransformerException, FOPException, MalformedURLException {
+            throws TransformerException, SAXException, IOException, ParserConfigurationException {
         
         DOMResult domres = new DOMResult();
 
@@ -119,9 +128,19 @@
         Fop fop;
 
         try {
+            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+            dbf.setNamespaceAware(true);
+            dbf.setValidating(false);
+            DocumentBuilder builder = dbf.newDocumentBuilder();
+            Document testDoc = builder.parse(testFile);
+            
+            XObject xo = XPathAPI.eval(testDoc, "/testcase/cfg/base14kerning");
+            String s = xo.str();
+            boolean base14kerning = ("true".equalsIgnoreCase(s));
+            
             //Setup Transformer to convert the testcase XML to XSL-FO
             Transformer transformer = getTestcase2FOStylesheet().newTransformer();
-            Source src = new StreamSource(testFile);
+            Source src = new DOMSource(testDoc);
             
             //Setup Transformer to convert the area tree to a DOM
             TransformerHandler athandler = tfactory.newTransformerHandler();
@@ -130,6 +149,7 @@
             //Setup FOP for area tree rendering
             FOUserAgent ua = new FOUserAgent();
             ua.setBaseURL(testFile.getParentFile().toURL().toString());
+            ua.setBase14KerningEnabled(base14kerning);
             XMLRenderer atrenderer = new XMLRenderer();
             atrenderer.setUserAgent(ua);
             atrenderer.setContentHandler(athandler);

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_basic_2.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_basic_2.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_basic_2.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_basic_2.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -73,7 +73,8 @@
     <eval expected="8616" xpath="//flow/block[4]/lineArea/text/@baseline"/>
     <eval expected="0" xpath="//flow/block[5]/lineArea/inlineparent/@offset"/>
     <eval expected="8616" xpath="//flow/block[5]/lineArea/inlineparent/text/@baseline"/>
-    <eval expected="0" xpath="//flow/block[6]/lineArea/char/@offset"/>
-    <eval expected="8616" xpath="//flow/block[6]/lineArea/char/@baseline"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea/text/@offset"/>
+    <eval expected="0" xpath="//flow/block[6]/lineArea/text/word/@offset"/>
+    <eval expected="8616" xpath="//flow/block[6]/lineArea/text/@baseline"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space-collapse_1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space-collapse_1.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space-collapse_1.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space-collapse_1.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -104,7 +104,8 @@
     <eval expected="2" xpath="count(//flow/block[1]/lineArea[1]/text[2]/word)"/>
     <eval expected="1" xpath="count(//flow/block[1]/lineArea[1]/text[2]/space)"/>
     <eval expected="1" xpath="count(//flow/block[1]/lineArea[1]/text[3]/word)"/>
-    <eval expected="1" xpath="count(//flow/block[1]/lineArea[1]/char)"/>
+    <eval expected=" " xpath="//flow/block[1]/lineArea[1]/text[3]/word"/>
+    <eval expected="1" xpath="count(//flow/block[1]/lineArea[1]/text[4]/word)"/>
     
     <eval expected="3" xpath="count(//flow/block[2]/block[1]/lineArea[1]/text/word)"/>
     <eval expected="2" xpath="count(//flow/block[2]/block[1]/lineArea[1]/text/space)"/>

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml?rev=386327&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml Thu Mar 16 05:51:14 2006
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks element generation for various spaces.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal">
+        <fo:flow flow-name="xsl-region-body">
+          <!-- for nbsp see block_white-space_2 and block_white-space_3 -->
+          <fo:block>
+            <fo:block background-color="yellow" id="l-sp">« text text »<fo:inline font-style="italic"> (normal space)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="l-thin-space">«&#x2009;text text&#x2009;»<fo:inline font-style="italic"> (thin space, &amp;#x2009;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="l-hair-space">«&#x200A;text text&#x200A;»<fo:inline font-style="italic"> (hair space, &amp;#x200A;)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="l-zwsp">«&#x200B;text text&#x200B;»<fo:inline font-style="italic"> (zero width space, &amp;#x200B;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="l-nosp">«text text»<fo:inline font-style="italic"> (no spaces)</fo:inline></fo:block>
+          </fo:block>
+          <fo:block space-before="2mm" text-align="center">
+            <fo:block background-color="yellow" id="c-sp">« text text »<fo:inline font-style="italic"> (normal space)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="c-thin-space">«&#x2009;text text&#x2009;»<fo:inline font-style="italic"> (thin space, &amp;#x2009;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="c-hair-space">«&#x200A;text text&#x200A;»<fo:inline font-style="italic"> (hair space, &amp;#x200A;)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="c-zwsp">«&#x200B;text text&#x200B;»<fo:inline font-style="italic"> (zero width space, &amp;#x200B;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="c-nosp">«text text»<fo:inline font-style="italic"> (no spaces)</fo:inline></fo:block>
+          </fo:block>
+          <fo:block space-before="2mm" text-align="justify" text-align-last="justify">
+            <fo:block background-color="yellow" id="j-sp">« text text »<fo:inline font-style="italic"> (normal space)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="j-thin-space">«&#x2009;text text&#x2009;»<fo:inline font-style="italic"> (thin space, &amp;#x2009;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="j-hair-space">«&#x200A;text text&#x200A;»<fo:inline font-style="italic"> (hair space, &amp;#x200A;)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="j-zwsp">«&#x200B;text text&#x200B;»<fo:inline font-style="italic"> (zero width space, &amp;#x200B;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="j-nosp">«text text»<fo:inline font-style="italic"> (no spaces)</fo:inline></fo:block>
+          </fo:block>
+          <fo:block space-before="2mm" text-align="justify" text-align-last="justify" letter-spacing="2pt">
+            <fo:block background-color="yellow" id="lsj-sp">« text text »<fo:inline font-style="italic"> (normal space)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="lsj-thin-space">«&#x2009;text text&#x2009;»<fo:inline font-style="italic"> (thin space, &amp;#x2009;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="lsj-hair-space">«&#x200A;text text&#x200A;»<fo:inline font-style="italic"> (hair space, &amp;#x200A;)</fo:inline></fo:block>
+            <fo:block background-color="orange" id="lsj-zwsp">«&#x200B;text text&#x200B;»<fo:inline font-style="italic"> (zero width space, &amp;#x200B;)</fo:inline></fo:block>
+            <fo:block background-color="yellow" id="lsj-nosp">«text text»<fo:inline font-style="italic"> (no spaces)</fo:inline></fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <element-list category="line" id="l-sp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>11</skip>
+    </element-list>
+    <eval expected="62040" xpath="//block[@prod-id='l-sp']/lineArea/text/@ipd"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[1])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[2])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[3])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[4])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[5])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[6])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-sp']/lineArea/text/*[7])"/>
+    <true xpath="not(//block[@prod-id='l-sp']/lineArea/text/*[2]/@adj = 'false')"/>
+    <true xpath="not(//block[@prod-id='l-sp']/lineArea/text/*[6]/@adj = 'false')"/>
+
+    <element-list category="line" id="l-thin-space">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="2400" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="2400" y="-10008" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>15</skip>
+    </element-list>
+    <eval expected="60168" xpath="//block[@prod-id='l-thin-space']/lineArea/text/@ipd"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[1])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[2])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[3])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[4])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[5])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[6])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='l-thin-space']/lineArea/text/*[7])"/>
+    <true xpath="//block[@prod-id='l-thin-space']/lineArea/text/*[2]/@adj = 'false'"/>
+    <true xpath="//block[@prod-id='l-thin-space']/lineArea/text/*[6]/@adj = 'false'"/>
+
+    <element-list category="line" id="l-hair-space">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="1200" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="1200" y="-10008" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>15</skip>
+    </element-list>
+    <eval expected="57768" xpath="//block[@prod-id='l-hair-space']/lineArea/text/@ipd"/>
+    <true xpath="//block[@prod-id='l-hair-space']/lineArea/text/*[2]/@adj = 'false'"/>
+    <true xpath="//block[@prod-id='l-hair-space']/lineArea/text/*[6]/@adj = 'false'"/>
+
+    <element-list category="line" id="l-zwsp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="0" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="0" y="-10008" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>19</skip>
+    </element-list>
+    <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'"/>
+
+    <element-list category="line" id="l-nosp">
+      <box w="26016"/>
+      
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-10008" z="0"/>
+      
+      <box w="26016"/>
+
+      <skip>11</skip>
+    </element-list>
+    <eval expected="55368" xpath="//block[@prod-id='l-nosp']/lineArea/text/@ipd"/>
+
+    <element-list category="line" id="c-thin-space">
+      <glue w="0" y="10008" z="0"/>
+
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="2400" y="-20016" z="0"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="0" y="10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="3336" y="-20016" z="0"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="0" y="10008" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="10008" z="0"/>
+      <penalty w="0" p="0"/>
+      <glue w="2400" y="-20016" z="0"/>
+      <box w="0"/>
+      <penalty w="0" p="INF"/>
+      <glue w="0" y="10008" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>23</skip>
+    </element-list>
+    <eval expected="60168" xpath="//block[@prod-id='c-thin-space']/lineArea/text/@ipd"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[1])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[2])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[3])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[4])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[5])"/>
+    <eval expected="space" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[6])"/>
+    <eval expected="word" xpath="local-name(//block[@prod-id='c-thin-space']/lineArea/text/*[7])"/>
+    <true xpath="//block[@prod-id='c-thin-space']/lineArea/text/*[2]/@adj = 'false'"/>
+    <true xpath="//block[@prod-id='c-thin-space']/lineArea/text/*[6]/@adj = 'false'"/>
+
+    <element-list category="line" id="j-sp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="3336" y="1668" z="1112"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="3336" y="1668" z="1112"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="3336" y="1668" z="1112"/>
+      
+      <box w="6672"/>
+
+      <skip>5</skip>
+    </element-list>
+    <eval expected="190804" xpath="//block[@prod-id='j-sp']/lineArea/text/@ipd"/>
+    <eval expected="42921" xpath="//block[@prod-id='j-sp']/lineArea/text/@twsadjust"/>
+
+    <element-list category="line" id="j-thin-space">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="2400" y="0" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="3336" y="1668" z="1112"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="2400" y="0" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>7</skip>
+    </element-list>
+    <eval expected="104277" xpath="//block[@prod-id='j-thin-space']/lineArea/text/@ipd"/>
+    <eval expected="44109" xpath="//block[@prod-id='j-thin-space']/lineArea/text/@twsadjust"/>
+    <true xpath="//block[@prod-id='j-thin-space']/lineArea/text/*[2]/@adj = 'false'"/>
+    <true xpath="//block[@prod-id='j-thin-space']/lineArea/text/*[6]/@adj = 'false'"/>
+
+    <element-list category="line" id="j-zwsp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="0" z="0"/>
+      
+      <box w="19344"/>
+      
+      <!-- second space -->
+      <glue w="3336" y="1668" z="1112"/>
+      
+      <box w="19344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="0" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>9</skip>
+    </element-list>
+    <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'"/>
+
+    <element-list category="line" id="lsj-sp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="7336" y="1668" z="1112"/>
+      
+      <box w="25344"/>
+      
+      <!-- second space -->
+      <glue w="7336" y="1668" z="1112"/>
+      
+      <box w="25344"/>
+      
+      <!-- third space -->
+      <glue w="7336" y="1668" z="1112"/>
+      
+      <box w="6672"/>
+
+      <skip>5</skip>
+    </element-list>
+    <eval expected="182404" xpath="//block[@prod-id='lsj-sp']/lineArea/text/@ipd"/>
+    <eval expected="32121" xpath="//block[@prod-id='lsj-sp']/lineArea/text/@twsadjust"/>
+    <eval expected="2000" xpath="//block[@prod-id='lsj-sp']/lineArea/text/@tlsadjust"/>
+
+    <element-list category="line" id="lsj-thin-space">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="2400" y="0" z="0"/>
+      
+      <box w="25344"/>
+      
+      <!-- second space -->
+      <glue w="7336" y="1668" z="1112"/>
+      
+      <box w="25344"/>
+      
+      <!-- third space -->
+      <glue w="2400" y="0" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>7</skip>
+    </element-list>
+    <eval expected="104777" xpath="//block[@prod-id='lsj-thin-space']/lineArea/text/@ipd"/>
+    <eval expected="28609" xpath="//block[@prod-id='lsj-thin-space']/lineArea/text/@twsadjust"/>
+    <eval expected="2000" xpath="//block[@prod-id='lsj-thin-space']/lineArea/text/@tlsadjust"/>
+    <true xpath="//block[@prod-id='lsj-thin-space']/lineArea/text/*[2]/@adj = 'false'"/>
+    <true xpath="//block[@prod-id='lsj-thin-space']/lineArea/text/*[6]/@adj = 'false'"/>
+
+    <element-list category="line" id="lsj-zwsp">
+      <box w="6672"/>
+
+      <!-- first space -->
+      <glue w="0" y="0" z="0"/>
+      
+      <box w="25344"/>
+      
+      <!-- second space -->
+      <glue w="7336" y="1668" z="1112"/>
+      
+      <box w="25344"/>
+      
+      <!-- third space -->
+      <glue w="0" y="0" z="0"/>
+      
+      <box w="6672"/>
+
+      <skip>9</skip>
+    </element-list>
+    <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'"/>
+
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block_white-space_4.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-color.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-color.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-color.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-color.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -38,6 +38,6 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/char/@background"/>
+    <eval expected="color=#ffff00" xpath="//flow/block[1]/lineArea/text[2]/@background"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-image.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-image.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-image.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_background-image.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=8976,vertical=21360" xpath="//flow/block[1]/lineArea/char[1]/@background"/>
-    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" xpath="//flow/block[1]/lineArea/char[2]/@background"/>
+    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=8976,vertical=21360" xpath="//flow/block[1]/lineArea/text[1]/@background"/>
+    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=-9696,vertical=-840" xpath="//flow/block[1]/lineArea/text[3]/@background"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_border_padding.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_border_padding.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_border_padding.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_border_padding.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -47,52 +47,52 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="7180" xpath="//flow/block[1]/lineArea/char/@baseline"/>
-    <eval expected="0" xpath="//flow/block[1]/lineArea/char/@offset"/>
-    <eval expected="5560" xpath="//flow/block[1]/lineArea/char/@ipd"/>
-    <eval expected="7560" xpath="//flow/block[1]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/char/@border-start"/>
-
-    <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@baseline"/>
-    <eval expected="0" xpath="//flow/block[2]/lineArea/char/@offset"/>
-    <eval expected="5560" xpath="//flow/block[2]/lineArea/char/@ipd"/>
-    <eval expected="25560" xpath="//flow/block[2]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/char/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[2]/lineArea/char/@padding-start"/>
-
-    <eval expected="7180" xpath="//flow/block[3]/lineArea/char/@baseline"/>
-    <eval expected="0" xpath="//flow/block[3]/lineArea/char/@offset"/>
-    <eval expected="5000" xpath="//flow/block[3]/lineArea/char/@ipd"/>
-    <eval expected="17000" xpath="//flow/block[3]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/char/@border-start"/>
-    <eval expected="3000" xpath="//flow/block[3]/lineArea/char/@padding-after"/>
-    <eval expected="1000" xpath="//flow/block[3]/lineArea/char/@padding-before"/>
-    <eval expected="2000" xpath="//flow/block[3]/lineArea/char/@padding-end"/>
-    <eval expected="4000" xpath="//flow/block[3]/lineArea/char/@padding-start"/>
-
-    <eval expected="5744" xpath="//flow/block[4]/lineArea/char/@baseline"/>
-    <eval expected="8616" xpath="//flow/block[4]/lineArea/char/@offset"/>
-    <eval expected="4448" xpath="//flow/block[4]/lineArea/char/@ipd"/>
-    <eval expected="24448" xpath="//flow/block[4]/lineArea/char/@ipda"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-after"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-before"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-end"/>
-    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/char/@border-start"/>
-    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-after"/>
-    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-before"/>
-    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-end"/>
-    <eval expected="5000" xpath="//flow/block[4]/lineArea/char/@padding-start"/>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[1]/lineArea/text[2]/@ipd"/>
+    <eval expected="7560" xpath="//flow/block[1]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[1]/lineArea/text[2]/@border-start"/>
+
+    <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
+    <eval expected="5560" xpath="//flow/block[2]/lineArea/text[2]/@ipd"/>
+    <eval expected="25560" xpath="//flow/block[2]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[2]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[2]/lineArea/text[2]/@padding-start"/>
+
+    <eval expected="7180" xpath="//flow/block[3]/lineArea/text[2]/@baseline"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="5000" xpath="//flow/block[3]/lineArea/text[2]/@ipd"/>
+    <eval expected="17000" xpath="//flow/block[3]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[3]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[3]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[3]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,4000)" xpath="//flow/block[3]/lineArea/text[2]/@border-start"/>
+    <eval expected="3000" xpath="//flow/block[3]/lineArea/text[2]/@padding-after"/>
+    <eval expected="1000" xpath="//flow/block[3]/lineArea/text[2]/@padding-before"/>
+    <eval expected="2000" xpath="//flow/block[3]/lineArea/text[2]/@padding-end"/>
+    <eval expected="4000" xpath="//flow/block[3]/lineArea/text[2]/@padding-start"/>
+
+    <eval expected="5744" xpath="//flow/block[4]/lineArea/text[2]/@baseline"/>
+    <eval expected="8616" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="4448" xpath="//flow/block[4]/lineArea/text[2]/@ipd"/>
+    <eval expected="24448" xpath="//flow/block[4]/lineArea/text[2]/@ipda"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-after"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-before"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-end"/>
+    <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[4]/lineArea/text[2]/@border-start"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-after"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-before"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-end"/>
+    <eval expected="5000" xpath="//flow/block[4]/lineArea/text[2]/@padding-start"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_vertical-align.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_vertical-align.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_vertical-align.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/character_vertical-align.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -50,10 +50,10 @@
     </fo:root>
   </fo>
   <checks>
-    <eval expected="7180" xpath="//flow/block[1]/lineArea/char/@offset"/>
-    <eval expected="7180" xpath="//flow/block[2]/lineArea/char/@offset"/>
-    <eval expected="0" xpath="//flow/block[3]/lineArea/char/@offset"/>
-    <eval expected="4565" xpath="//flow/block[4]/lineArea/char/@offset"/>
-    <eval expected="9250" xpath="//flow/block[5]/lineArea/char/@offset"/>
+    <eval expected="7180" xpath="//flow/block[1]/lineArea/text[2]/@offset"/>
+    <eval expected="7180" xpath="//flow/block[2]/lineArea/text[2]/@offset"/>
+    <eval expected="0" xpath="//flow/block[3]/lineArea/text[2]/@offset"/>
+    <eval expected="4565" xpath="//flow/block[4]/lineArea/text[2]/@offset"/>
+    <eval expected="9250" xpath="//flow/block[5]/lineArea/text[2]/@offset"/>
   </checks>
 </testcase>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline-level_id.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline-level_id.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline-level_id.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline-level_id.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -69,7 +69,7 @@
     <eval expected="page-number1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[4]/lineArea/text[2]/@prod-id"/>
     <eval expected="page-number-citation1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[5]/lineArea/text[2]/@prod-id"/>
     <eval expected="leader1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[6]/lineArea/inlineparent/@prod-id"/>
-    <eval expected="char1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[7]/lineArea/char/@prod-id"/>
+    <eval expected="char1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[7]/lineArea/text[2]/@prod-id"/>
     <!--eval expected="bidi1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[8]/lineArea/???/@prod-id"/-->
     <eval expected="link1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[9]/lineArea/inlineparent/@prod-id"/>
     <eval expected="ifo1" xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/flow/block[10]/lineArea/viewport/@prod-id"/>

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml?rev=386327&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml Thu Mar 16 05:51:14 2006
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks kerning. This test has kerning switched off and is only used as a reference.
+    </p>
+  </info>
+  <cfg>
+    <base14kerning>false</base14kerning>
+  </cfg>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" font-family="sans-serif">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>
+            <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+          </fo:block>
+          <fo:block letter-spacing="1pt">
+            <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="40020" xpath="//flow/block[1]/block[1]/lineArea/inlineparent/@ipd"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/lineArea/inlineparent/text/@tlsadjust))"/>
+    <eval expected="0" xpath="//flow/block[1]/block[1]/lineArea/inlineparent/text/word/@offset"/>
+    <true xpath="not(boolean(//flow/block[1]/block[1]/lineArea/inlineparent/text/word/@letter-adjust))"/>
+
+    <eval expected="44020" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="1000" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/@tlsadjust"/>
+    <eval expected="0" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@offset"/>
+    <true xpath="not(boolean(//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@letter-adjust))"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_off.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml?rev=386327&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml Thu Mar 16 05:51:14 2006
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks kerning.
+    </p>
+  </info>
+  <cfg>
+    <base14kerning>true</base14kerning>
+  </cfg>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" font-family="sans-serif">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>
+            <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+          </fo:block>
+          <fo:block letter-spacing="1pt">
+            <fo:block><fo:inline>VAVAV</fo:inline> text-text Hello World.</fo:block>
+          </fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="36420" xpath="//flow/block[1]/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="0" xpath="//flow/block[1]/block[1]/lineArea/inlineparent/text/word/@offset"/>
+    <eval expected="0 -960 -840 -960 -840" xpath="//flow/block[1]/block[1]/lineArea/inlineparent/text/word/@letter-adjust"/>
+
+    <eval expected="40420" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/@ipd"/>
+    <eval expected="1000" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/@tlsadjust"/>
+    <eval expected="0" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@offset"/>
+    <eval expected="0 -960 -840 -960 -840" xpath="//flow/block[2]/block[1]/lineArea/inlineparent/text/word/@letter-adjust"/>
+  </checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/kerning_1_on.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/text-decoration_1.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/text-decoration_1.xml?rev=386327&r1=386326&r2=386327&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/text-decoration_1.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/text-decoration_1.xml Thu Mar 16 05:51:14 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2005 The Apache Software Foundation
+  Copyright 2005-2006 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -89,9 +89,9 @@
     <true xpath="//flow/block[7]/lineArea/text/@underline-score"/>
     <eval expected="#000000" xpath="//flow/block[7]/lineArea/text/@underline-score-color"/>
     
-    <true xpath="not(//flow/block[8]/lineArea/text/@underline-score)"/>
-    <true xpath="//flow/block[8]/lineArea/char/@underline-score"/>
-    <eval expected="#000000" xpath="//flow/block[8]/lineArea/char/@underline-score-color"/>
+    <true xpath="not(//flow/block[8]/lineArea/text[1]/@underline-score)"/>
+    <true xpath="//flow/block[8]/lineArea/text[2]/@underline-score"/>
+    <eval expected="#000000" xpath="//flow/block[8]/lineArea/text[2]/@underline-score-color"/>
     
     <true xpath="not(//flow/block[9]/lineArea/text[1]/@underline-score)"/>
     <true xpath="//flow/block[9]/lineArea/text[2]/@underline-score"/>



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