diff options
-rw-r--r-- | fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java | 10 | ||||
-rw-r--r-- | fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java | 8 |
2 files changed, 15 insertions, 3 deletions
diff --git a/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java b/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java index 157a480cc..4ecc54104 100644 --- a/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java +++ b/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java @@ -170,6 +170,16 @@ public class LineBreakStatus { hadSpace = true; return PROHIBITED_BREAK; + case LineBreakUtils.LINE_BREAK_PROPERTY_JL: + case LineBreakUtils.LINE_BREAK_PROPERTY_JV: + case LineBreakUtils.LINE_BREAK_PROPERTY_H2: + case LineBreakUtils.LINE_BREAK_PROPERTY_H3: + // LB 26: Do not break a Korean syllable. + if (!hadSpace) { + return PROHIBITED_BREAK; + } + break; + default: //nop } diff --git a/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java b/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java index e4854d9a7..279c2f7fc 100644 --- a/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java @@ -41,7 +41,6 @@ public class LineBreakStatusTestCase { */ @Test public void testReset() { - System.out.println("testReset"); // TODO } @@ -51,8 +50,6 @@ public class LineBreakStatusTestCase { */ @Test public void testNextChar() { - System.out.println("testNextChar"); - // AL -- Ordinary Alphabetic and Symbol Characters (XP) assertTrue(testBreak( "Nobreak", @@ -309,6 +306,11 @@ public class LineBreakStatusTestCase { "^^" + "^" + "^^^^^" )); + // hangul syllables + assertTrue(testBreak( + "Simple" + "\uAC00" + "break", + "^^^^^^" + "^" + "^^^^^" + )); } /** |