aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/util
diff options
context:
space:
mode:
authorManuel Mall <manuel@apache.org>2007-07-18 10:40:12 +0000
committerManuel Mall <manuel@apache.org>2007-07-18 10:40:12 +0000
commitd0ffc489d529e3d63362b5780cd83558459eeda4 (patch)
tree834ad295d251319fc4beda25874e837beb2c88a2 /src/java/org/apache/fop/util
parent1b5c727a2d4ca6497ebabdd5f2261837fce55194 (diff)
downloadxmlgraphics-fop-d0ffc489d529e3d63362b5780cd83558459eeda4.tar.gz
xmlgraphics-fop-d0ffc489d529e3d63362b5780cd83558459eeda4.zip
Fixed incomplete support for Unicode word joiners
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557219 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/util')
-rw-r--r--src/java/org/apache/fop/util/CharUtilities.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/util/CharUtilities.java b/src/java/org/apache/fop/util/CharUtilities.java
index 1aad75ad7..5663dbb1e 100644
--- a/src/java/org/apache/fop/util/CharUtilities.java
+++ b/src/java/org/apache/fop/util/CharUtilities.java
@@ -60,6 +60,8 @@ public class CharUtilities {
public static final char NBSPACE = '\u00A0';
/** zero-width space */
public static final char ZERO_WIDTH_SPACE = '\u200B';
+ /** word joiner */
+ public static final char WORD_JOINER = '\u2060';
/** zero-width no-break space (= byte order mark) */
public static final char ZERO_WIDTH_NOBREAK_SPACE = '\uFEFF';
/** soft hyphen */
@@ -106,6 +108,7 @@ public class CharUtilities {
*/
public static boolean isZeroWidthSpace(char c) {
return c == ZERO_WIDTH_SPACE // 200Bh
+ || c == WORD_JOINER // 2060h
|| c == ZERO_WIDTH_NOBREAK_SPACE; // FEFFh (also used as BOM)
}
@@ -115,7 +118,8 @@ public class CharUtilities {
* @return true if the character has a fixed-width
*/
public static boolean isFixedWidthSpace(char c) {
- return (c >= '\u2000' && c <= '\u200B') || c == '\u3000';
+ return (c >= '\u2000' && c <= '\u200B')
+ || c == '\u3000';
// c == '\u2000' // en quad
// c == '\u2001' // em quad
// c == '\u2002' // en space
@@ -142,6 +146,7 @@ public class CharUtilities {
(c == NBSPACE // no-break space
|| c == '\u202F' // narrow no-break space
|| c == '\u3000' // ideographic space
+ || c == WORD_JOINER // word joiner
|| c == ZERO_WIDTH_NOBREAK_SPACE); // zero width no-break space
}