From: Manuel Mall Date: Sun, 22 Jul 2007 02:55:46 +0000 (+0000) Subject: Corrected issue with zero width spaces being given a non zero width X-Git-Tag: fop-0_95beta~426 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=22887795cf8e437a4c0e023b2ff61f850ccfe12f;p=xmlgraphics-fop.git Corrected issue with zero width spaces being given a non zero width git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@558455 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java index 93196d8ab..2a61ca188 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java @@ -695,7 +695,7 @@ public class TextLayoutManager extends LeafNodeLayoutManager { iThisStart = (short) (iNextStart + 1); } else if (CharUtilities.isFixedWidthSpace(ch) || CharUtilities.isZeroWidthSpace(ch)) { // create the AreaInfo object - MinOptMax ipd = new MinOptMax(font.getCharWidth(ch)); + MinOptMax ipd = new MinOptMax(CharUtilities.isZeroWidthSpace(ch) ? 0 : font.getCharWidth(ch)); ai = new AreaInfo(iNextStart, (short) (iNextStart + 1), (short) 0, (short) 0, ipd, false, true, breakOpportunity); diff --git a/test/layoutengine/standard-testcases/block_uax14_linebreaking.xml b/test/layoutengine/standard-testcases/block_uax14_linebreaking.xml index ea6e3ddcd..715a9364a 100755 --- a/test/layoutengine/standard-testcases/block_uax14_linebreaking.xml +++ b/test/layoutengine/standard-testcases/block_uax14_linebreaking.xml @@ -191,9 +191,8 @@ - - - - + + +