aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/TextLayoutManager.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/TextLayoutManager.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
index 08db32806..e44a9aa90 100644
--- a/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
@@ -20,6 +20,7 @@ package org.apache.fop.layoutmgr;
import java.util.ArrayList;
+import org.apache.fop.fo.FOText;
import org.apache.fop.fo.TextInfo;
import org.apache.fop.traits.SpaceVal;
import org.apache.fop.area.Trait;
@@ -98,10 +99,13 @@ public class TextLayoutManager extends AbstractLayoutManager {
* @param length length of the above array to be processed
* @param textInfo the text information for doing layout
*/
- public TextLayoutManager(char[] chars, int length, TextInfo textInfo) {
- this.textArray = chars;
- this.textArrayLength = length;
- this.textInfo = textInfo;
+ public TextLayoutManager(FOText node) {
+ super(node);
+ this.textArray = new char[node.ca.length - node.start];
+ System.arraycopy(node.ca, node.start, this.textArray, 0,
+ node.ca.length - node.start);
+ this.textArrayLength = node.ca.length - node.start;
+ this.textInfo = node.textInfo;
this.vecAreaInfo = new java.util.ArrayList();
// With CID fonts, space isn't neccesary currentFontState.width(32)