From ccbaa31a9f4a8c1d6d40de23eac5a2ae148af983 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 2 Feb 2005 15:03:55 +0000 Subject: [PATCH] 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 --- .../apache/fop/layoutmgr/TextLayoutManager.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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 -- 2.39.5