aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorManuel Mall <manuel@apache.org>2007-07-22 03:08:14 +0000
committerManuel Mall <manuel@apache.org>2007-07-22 03:08:14 +0000
commite298d0b1849d1d1361a686da3ce7319909128588 (patch)
tree40458f07c58754e008e6fade869800486ab30197 /src/java/org
parent22887795cf8e437a4c0e023b2ff61f850ccfe12f (diff)
downloadxmlgraphics-fop-e298d0b1849d1d1361a686da3ce7319909128588.tar.gz
xmlgraphics-fop-e298d0b1849d1d1361a686da3ce7319909128588.zip
Changed my mind on handling of width calculation for zero width spaces and moved it into the Font class where other similar cases are already dealt with
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@558456 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/fonts/Font.java4
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fonts/Font.java b/src/java/org/apache/fop/fonts/Font.java
index e8a81a0ea..b8e7fa9c8 100644
--- a/src/java/org/apache/fop/fonts/Font.java
+++ b/src/java/org/apache/fop/fonts/Font.java
@@ -284,8 +284,12 @@ public class Font {
width = 0;
} else if (c == '\u202F') {
width = getCharWidth(' ') / 2;
+ } else if (c == '\u2060') {
+ width = 0;
} else if (c == '\u3000') {
width = getCharWidth(' ') * 2;
+ } else if (c == '\ufeff') {
+ width = 0;
} else {
//Will be internally replaced by "#" if not found
width = getWidth(mapChar(c));
diff --git a/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
index 2a61ca188..93196d8ab 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(CharUtilities.isZeroWidthSpace(ch) ? 0 : font.getCharWidth(ch));
+ MinOptMax ipd = new MinOptMax(font.getCharWidth(ch));
ai = new AreaInfo(iNextStart, (short) (iNextStart + 1),
(short) 0, (short) 0,
ipd, false, true, breakOpportunity);