From: Jeremias Maerki Date: Wed, 2 Feb 2005 15:03:55 +0000 (+0000) Subject: Don't ignore linefeeds when building Knuth elements. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~142 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ccbaa31a9f4a8c1d6d40de23eac5a2ae148af983;p=xmlgraphics-fop.git Don't ignore linefeeds when building Knuth elements. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198365 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java index bc78e15db..186b9c089 100644 --- a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java @@ -788,16 +788,13 @@ public class TextLayoutManager extends AbstractLayoutManager iThisStart = iNextStart; iTempStart = iNextStart; MinOptMax wordIPD = new MinOptMax(0); - for (; - iTempStart < textArray.length - && textArray[iTempStart] != SPACE - && textArray[iTempStart] != NBSPACE; - iTempStart ++) { - // ignore newline characters - if (textArray[iTempStart] != NEWLINE) { - wordIPD.add - (new MinOptMax(fs.getCharWidth(textArray[iTempStart]))); - } + for (; iTempStart < textArray.length + && textArray[iTempStart] != SPACE + && textArray[iTempStart] != NBSPACE + && textArray[iTempStart] != NEWLINE; + iTempStart++) { + wordIPD.add( + new MinOptMax(fs.getCharWidth(textArray[iTempStart]))); } wordIPD.add(MinOptMax.multiply(letterSpaceIPD, (iTempStart - iThisStart - 1))); vecAreaInfo.add