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 ma...@apache.org on 2007/07/22 05:08:15 UTC
svn commit: r558456 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop:
fonts/Font.java layoutmgr/inline/TextLayoutManager.java
Author: manuel
Date: Sat Jul 21 20:08:14 2007
New Revision: 558456
URL: http://svn.apache.org/viewvc?view=rev&rev=558456
Log:
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
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/Font.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/Font.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/Font.java?view=diff&rev=558456&r1=558455&r2=558456
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/Font.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/Font.java Sat Jul 21 20:08:14 2007
@@ -284,8 +284,12 @@
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));
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?view=diff&rev=558456&r1=558455&r2=558456
==============================================================================
--- 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 Sat Jul 21 20:08:14 2007
@@ -695,7 +695,7 @@
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);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org