Author: ssteiner Date: Thu Oct 27 07:07:25 2022 New Revision: 1904866 URL: http://svn.apache.org/viewvc?rev=1904866&view=rev Log: FOP-3101: Don't break with hangul syllables
Modified: xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java Modified: xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java?rev=1904866&r1=1904865&r2=1904866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/text/linebreak/LineBreakStatus.java Thu Oct 27 07:07:25 2022 @@ -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 } Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java?rev=1904866&r1=1904865&r2=1904866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/text/linebreak/LineBreakStatusTestCase.java Thu Oct 27 07:07:25 2022 @@ -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", + "^^^^^^" + "^" + "^^^^^" + )); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org