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/11/02 21:47:34 UTC

svn commit: r1405158 - in /xmlgraphics/fop/trunk: ./ src/documentation/intermediate-format-ng/ src/java/org/apache/fop/area/inline/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/apache/fop/render/intermediate/ src/java/org/apache/fop/render/pd...

Author: vhennebert
Date: Fri Nov  2 20:47:32 2012
New Revision: 1405158

URL: http://svn.apache.org/viewvc?rev=1405158&view=rev
Log:
Bugzilla #54081: properly tag hyphenated words in PDF output when accessibility is enabled

Added:
    xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml   (with props)
    xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo   (with props)
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/hyphenation.pdf   (with props)
Modified:
    xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java
    xmlgraphics/fop/trunk/status.xml
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_single.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_repeat.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_single.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_single.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/complete.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_jpg.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_png.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_svg.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_wmf.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/language.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/leader.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/links.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role_non-standard.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/side-regions.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/table_row-col-span.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_1.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_2.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_font-embedding.pdf
    xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/th_scope.pdf

Modified: xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd (original)
+++ xmlgraphics/fop/trunk/src/documentation/intermediate-format-ng/fop-intermediate-format-ng-content.xsd Fri Nov  2 20:47:32 2012
@@ -68,6 +68,7 @@
               <xs:attribute name="word-spacing" type="mf:lengthType"/>
               <xs:attribute name="dx" type="mf:lengthListType"/>
               <xs:attribute name="dp" type="mf:dpListType"/>
+              <xs:attribute name="hyphenated" type="xs:boolean"/>
             </xs:extension>
           </xs:simpleContent>
         </xs:complexType>

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/TextArea.java Fri Nov  2 20:47:32 2012
@@ -30,6 +30,8 @@ public class TextArea extends AbstractTe
 
     private static final long serialVersionUID = 7315900267242540809L;
 
+    private boolean isHyphenated;
+
     /**
      * Create a text inline area
      */
@@ -117,6 +119,20 @@ public class TextArea extends AbstractTe
     }
 
     /**
+     * Records that the last word in this text area is hyphenated.
+     */
+    public void setHyphenated() {
+        this.isHyphenated = true;
+    }
+
+    /**
+     * Returns {@code true} if the last word in this area is hyphenated.
+     */
+    public boolean isHyphenated() {
+        return isHyphenated;
+    }
+
+    /**
      * Get the whole text string.
      * Renderers whose space adjustment handling is not affected
      * by multi-byte characters can use this method to render the

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Fri Nov  2 20:47:32 2012
@@ -624,6 +624,7 @@ public class TextLayoutManager extends L
             wordChars.append(foText.getCommonHyphenation().getHyphChar(font));
             // [TBD] expand bidi word levels, letter space adjusts, gpos adjusts
             // [TBD] [GA] problematic in bidi context... what is level of hyphen?
+            textArea.setHyphenated();
         }
 
         /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFContext.java Fri Nov  2 20:47:32 2012
@@ -53,6 +53,8 @@ public class IFContext {
 
     private String location;
 
+    private boolean hyphenated;
+
     /**
      * Main constructor.
      * @param ua the user agent
@@ -200,4 +202,18 @@ public class IFContext {
         return location;
     }
 
+    /**
+     * Records that the last text in the currently processed text area is hyphenated.
+     */
+    public void setHyphenated(boolean hyphenated) {
+        this.hyphenated = hyphenated;
+    }
+
+    /**
+     * Returns {@code true} if the last text in the currently processed text area is hyphenated.
+     */
+    public boolean isHyphenated() {
+        return hyphenated;
+    }
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFParser.java Fri Nov  2 20:47:32 2012
@@ -633,7 +633,12 @@ public class IFParser implements IFConst
                     dp = IFUtil.convertDXToDP ( dx );
                 }
                 establishStructureTreeElement(lastAttributes);
+                boolean isHyphenated = Boolean.valueOf(lastAttributes.getValue("hyphenated"));
+                if (isHyphenated) {
+                    documentHandler.getContext().setHyphenated(isHyphenated);
+                }
                 painter.drawText(x, y, letterSpacing, wordSpacing, dp, content.toString());
+                documentHandler.getContext().setHyphenated(false);
                 resetStructureTreeElement();
             }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java Fri Nov  2 20:47:32 2012
@@ -1032,10 +1032,12 @@ public class IFRenderer extends Abstract
         textUtil.flush();
         textUtil.setStartPosition(rx, bl);
         textUtil.setSpacing(text.getTextLetterSpaceAdjust(), text.getTextWordSpaceAdjust());
+        documentHandler.getContext().setHyphenated(text.isHyphenated());
         super.renderText(text);
 
         textUtil.flush();
         renderTextDecoration(tf, size, text, bl, rx);
+        documentHandler.getContext().setHyphenated(false);
         resetStructurePointer();
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java Fri Nov  2 20:47:32 2012
@@ -678,6 +678,9 @@ implements IFConstants, IFPainter, IFDoc
                 }
             }
             addStructureReference(atts);
+            if (getContext().isHyphenated()) {
+                addAttribute(atts, "hyphenated", "true");
+            }
             handler.startElement(EL_TEXT, atts);
             char[] chars = text.toCharArray();
             handler.characters(chars, 0, chars.length);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java Fri Nov  2 20:47:32 2012
@@ -32,6 +32,7 @@ import org.apache.fop.pdf.PDFNumber;
 import org.apache.fop.pdf.PDFPaintingState;
 import org.apache.fop.pdf.PDFResourceContext;
 import org.apache.fop.pdf.PDFStream;
+import org.apache.fop.pdf.PDFText;
 import org.apache.fop.pdf.PDFTextUtil;
 import org.apache.fop.pdf.PDFXObject;
 
@@ -171,17 +172,36 @@ public class PDFContentGenerator {
     }
 
     /**
-     * Begins a new marked content sequence (BDC or BMC). If the parameter structElemType is null,
-     * the sequenceNum is ignored and instead of a BDC with the MCID as parameter, an "Artifact"
-     * and a BMC command is generated.
-     * @param structElemType Structure Element Type
-     * @param mcid    Sequence number
+     * Begins a new marked content sequence (BDC or BMC). If {@code structElemType} is
+     * null, a BMC operator with an "Artifact" tag is generated. Otherwise, a BDC operator
+     * with {@code structElemType} as a tag is generated, and the given mcid stored in its
+     * property list.
+     *
+     * @param structElemType the type of the associated structure element
+     * @param mcid the marked content identifier
      */
     protected void beginMarkedContentSequence(String structElemType, int mcid) {
+        beginMarkedContentSequence(structElemType, mcid, null);
+    }
+
+    /**
+     * Begins a new marked content sequence (BDC or BMC). If {@code structElemType} is
+     * null, a BMC operator with an "Artifact" tag is generated. Otherwise, a BDC operator
+     * with {@code structElemType} as a tag is generated, and the given mcid and actual
+     * text are stored in its property list.
+     *
+     * @param structElemType the type of the associated structure element
+     * @param mcid the marked content identifier
+     * @param actualText the replacement text for the marked content
+     */
+    protected void beginMarkedContentSequence(String structElemType, int mcid, String actualText) {
         assert !this.inMarkedContentSequence;
         assert !this.inArtifactMode;
         if (structElemType != null) {
-            currentStream.add(structElemType + " <</MCID " + String.valueOf(mcid) + ">>\n"
+            String actualTextProperty = actualText == null ? ""
+                    : " /ActualText " + PDFText.escapeText(actualText);
+            currentStream.add(structElemType + " <</MCID " + String.valueOf(mcid)
+                    + actualTextProperty + ">>\n"
                     + "BDC\n");
         } else {
             currentStream.add("/Artifact\nBMC\n");
@@ -230,21 +250,6 @@ public class PDFContentGenerator {
         currentState.restore();
     }
 
-    /**
-     * Separates 2 text elements, ending the current marked content sequence and
-     * starting a new one.
-     *
-     * @param structElemType structure element type
-     * @param mcid sequence number
-     * @see #beginMarkedContentSequence(String, int)
-     */
-    protected void separateTextElements(String structElemType, int mcid) {
-        textutil.endTextObject();
-        endMarkedContentSequence();
-        beginMarkedContentSequence(structElemType, mcid);
-        textutil.beginTextObject();
-    }
-
     /** Indicates the beginning of a text object. */
     protected void beginTextObject() {
         if (!textutil.isInTextObject()) {
@@ -261,8 +266,21 @@ public class PDFContentGenerator {
      * @see #beginMarkedContentSequence(String, int)
      */
     protected void beginTextObject(String structElemType, int mcid) {
+        beginTextObject(structElemType, mcid, null);
+    }
+
+    /**
+     * Indicates the beginning of a marked-content text object.
+     *
+     * @param structElemType structure element type
+     * @param mcid sequence number
+     * @param actualText the replacement text for the marked content
+     * @see #beginTextObject()
+     * @see #beginMarkedContentSequence(String, int, String))
+     */
+    protected void beginTextObject(String structElemType, int mcid, String actualText) {
         if (!textutil.isInTextObject()) {
-            beginMarkedContentSequence(structElemType, mcid);
+            beginMarkedContentSequence(structElemType, mcid, actualText);
             textutil.beginTextObject();
         }
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFPainter.java Fri Nov  2 20:47:32 2012
@@ -343,11 +343,10 @@ public class PDFPainter extends Abstract
             PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
             languageAvailabilityChecker.checkLanguageAvailability(text);
             MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(structElem);
-            if (generator.getTextUtil().isInTextObject()) {
-                generator.separateTextElements(mci.tag, mci.mcid);
-            }
+            String actualText = getContext().isHyphenated() ? text.substring(0, text.length() - 1) : null;
+            generator.endTextObject();
             generator.updateColor(state.getTextColor(), true, null);
-            generator.beginTextObject(mci.tag, mci.mcid);
+            generator.beginTextObject(mci.tag, mci.mcid, actualText);
         } else {
             generator.updateColor(state.getTextColor(), true, null);
             generator.beginTextObject();

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Fri Nov  2 20:47:32 2012
@@ -59,6 +59,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Renderers" dev="VH" type="add" fixes-bug="54081">
+        PDF accessibility: properly tag hyphenated words.
+      </action>
       <action context="Code" dev="CB" type="fix" fixes-bug="48955" due-to="Peter Hancock">
         Allow AFP font codepage names to be less than 8 chars
       </action>

Added: xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml?rev=1405158&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml (added)
+++ xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml Fri Nov  2 20:47:32 2012
@@ -0,0 +1,56 @@
+<?xml version="1.0" standalone="no"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+<testcase>
+  <info>
+    <p>
+      This test checks that lines ending with a hyphenated word are properly marked as such.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xml:lang="en-US">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="page"
+          page-height="170pt" page-width="220pt" margin="10pt">
+          <fo:region-body display-align="center"/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="page" hyphenate="true">
+        <fo:flow flow-name="xsl-region-body" text-align="justify">
+          <fo:block-container width="140pt" start-indent="30pt">
+            <fo:block start-indent="0">Hyphenated text. Hyphenated text. Hyphenated text. Hyphenated 
+              text. Hyphenated text.</fo:block>
+          </fo:block-container>
+          <fo:block-container width="140pt" space-before="10pt" start-indent="30pt">
+            <fo:block start-indent="0">Hyphenated text with ‘special’ character. Hyphenated text 
+              with ‘special’ character.</fo:block>
+          </fo:block-container>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <if-checks xmlns:if="http://xmlgraphics.apache.org/fop/intermediate">
+    <eval expected="true" xpath="/descendant::if:text[1]/@hyphenated"/>
+    <eval expected=""     xpath="/descendant::if:text[2]/@hyphenated"/>
+    <eval expected="true" xpath="/descendant::if:text[3]/@hyphenated"/>
+    <eval expected=""     xpath="/descendant::if:text[4]/@hyphenated"/>
+    <eval expected="true" xpath="/descendant::if:text[5]/@hyphenated"/>
+    <eval expected="true" xpath="/descendant::if:text[6]/@hyphenated"/>
+    <eval expected="true" xpath="/descendant::if:text[7]/@hyphenated"/>
+    <eval expected=""     xpath="/descendant::if:text[8]/@hyphenated"/>
+  </if-checks>
+</testcase>

Propchange: xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/intermediate/hyphenation.xml
------------------------------------------------------------------------------
    svn:keywords = Revision Id

Added: xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo?rev=1405158&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo (added)
+++ xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo Fri Nov  2 20:47:32 2012
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xml:lang="en-US">
+  <fo:layout-master-set>
+    <fo:simple-page-master master-name="page"
+      page-height="170pt" page-width="220pt" margin="10pt">
+      <fo:region-body display-align="center"/>
+    </fo:simple-page-master>
+  </fo:layout-master-set>
+  <fo:page-sequence master-reference="page" hyphenate="true">
+    <fo:flow flow-name="xsl-region-body" text-align="justify">
+      <fo:block-container width="140pt" start-indent="30pt">
+        <fo:block start-indent="0">Hyphenated text. Hyphenated text. Hyphenated text. Hyphenated 
+          text. Hyphenated text.</fo:block>
+      </fo:block-container>
+      <fo:block-container width="140pt" space-before="10pt" start-indent="30pt">
+        <fo:block start-indent="0">Hyphenated text with ‘special’ character. Hyphenated text with 
+          ‘special’ character.</fo:block>
+      </fo:block-container>
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>

Propchange: xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/pdf/accessibility/hyphenation.fo
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_repeat.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_single.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_jpg_single.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_repeat.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_repeat.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_single.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_png_single.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_repeat.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_single.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/background-image_svg_single.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/complete.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/complete.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Added: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/hyphenation.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/hyphenation.pdf?rev=1405158&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/hyphenation.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_jpg.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_jpg.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_png.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_png.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_svg.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_svg.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_wmf.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/image_wmf.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/language.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/language.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/leader.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/leader.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/links.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/links.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role_non-standard.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/role_non-standard.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/side-regions.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/side-regions.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/table_row-col-span.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/table_row-col-span.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_1.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_1.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_2.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_2.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_font-embedding.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/text_font-embedding.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/th_scope.pdf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/pdf/accessibility/pdf/th_scope.pdf?rev=1405158&r1=1405157&r2=1405158&view=diff
==============================================================================
Binary files - no diff available.



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


Re: properly tag hyphenated words [was: svn commit: r1405158 - in /xmlgraphics/fop/trunk: ./ src/documentation/intermediate-format-ng/ src/java/org/apache/fop/area/inline/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/apache/fop/render/intermediate/ src/java/org/apache/fop/render/pd...]

Posted by Vincent Hennebert <vh...@gmail.com>.
(Some notes relating to this work that I thought would be more easily
retrievable if I put them here rather than in the Bugzilla entry.)

I had to forgo the soft hyphen approach due to a hack in XGC that
replaces soft hyphens with normal hyphens when no glyph is available in
the font for soft hyphen. So the o.a.f.fonts.Font.hasChar method will
return true for soft hyphen while it should actually return false.

Removing that hack will not work without making further changes to the
layout engine, which in some cases tries to render the soft hyphen like
any normal character, instead of treating it merely as a hyphenation
hint.

However, this is getting beyond the scope of this work. This will have
to be re-visited at another time.

Vincent


On 02/11/12 20:47, wrote:
> Author: vhennebert
> Date: Fri Nov  2 20:47:32 2012
> New Revision: 1405158
> 
> URL: http://svn.apache.org/viewvc?rev=1405158&view=rev
> Log:
> Bugzilla #54081: properly tag hyphenated words in PDF output when 
> accessibility is enabled