]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2417: Exception caused by letter space handling in Chinese sentence
authorLuis Bernardo <lbernardo@apache.org>
Fri, 17 Oct 2014 09:18:56 +0000 (09:18 +0000)
committerLuis Bernardo <lbernardo@apache.org>
Fri, 17 Oct 2014 09:18:56 +0000 (09:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1632522 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/GlyphMapping.java

index e75d9e0b610e2b630cfe1dabce379f0f3ef0c7fd..95db0ff480ee637ccd62f3de9be77bdf2666eca3 100644 (file)
@@ -278,10 +278,8 @@ public class GlyphMapping {
         wordIPD = wordIPD.plus(letterSpaceIPD.mult(letterSpaces));
 
         // create and return the AreaInfo object
-        return new GlyphMapping(startIndex, endIndex, 0,
-                            letterSpaces, wordIPD,
-                            endsWithHyphen,
-                            false, breakOpportunityChar != 0, font, level, null);
+        return new GlyphMapping(startIndex, endIndex, 0, letterSpaces, wordIPD, endsWithHyphen, false,
+                (breakOpportunityChar != 0) && !isSpace(breakOpportunityChar), font, level, null);
     }
 
     private static void addToLetterAdjust(MinOptMax[] letterSpaceAdjustArray, int index, int width) {