summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Bernard West <pbwest@apache.org>2004-05-29 18:56:11 +0000
committerPeter Bernard West <pbwest@apache.org>2004-05-29 18:56:11 +0000
commit2a6fc4aeefef0c8b7089ede51ef985b22a151479 (patch)
tree6161dc37ff1932f80f95a3d226ceae4fadf24b99 /src
parent83a5ea5ec5160cf40c0967d2fd96a89f75b23ba4 (diff)
downloadxmlgraphics-fop-2a6fc4aeefef0c8b7089ede51ef985b22a151479.tar.gz
xmlgraphics-fop-2a6fc4aeefef0c8b7089ede51ef985b22a151479.zip
Removed fontData field.
Moved processText() to LineArea. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/flow/FoPcdata.java56
1 files changed, 3 insertions, 53 deletions
diff --git a/src/java/org/apache/fop/fo/flow/FoPcdata.java b/src/java/org/apache/fop/fo/flow/FoPcdata.java
index 72a1697b7..eda87fe4f 100644
--- a/src/java/org/apache/fop/fo/flow/FoPcdata.java
+++ b/src/java/org/apache/fop/fo/flow/FoPcdata.java
@@ -20,16 +20,8 @@
package org.apache.fop.fo.flow;
// FOP
-import java.awt.Font;
-import java.awt.font.FontRenderContext;
-import java.awt.font.TextAttribute;
-import java.awt.font.TextLayout;
-import java.awt.font.TextMeasurer;
-import java.text.AttributedCharacterIterator;
-import java.text.AttributedString;
import java.util.Arrays;
import java.util.BitSet;
-import java.util.Map;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datastructs.TreeException;
@@ -39,9 +31,6 @@ import org.apache.fop.fo.FOTree;
import org.apache.fop.fo.FObjectNames;
import org.apache.fop.fo.PropNames;
import org.apache.fop.fo.PropertySets;
-import org.apache.fop.fo.expr.PropertyException;
-import org.apache.fop.fonts.FontException;
-import org.apache.fop.render.FontData;
import org.apache.fop.xml.XmlEvent;
/**
@@ -120,10 +109,6 @@ public class FoPcdata extends FOPageSeqNode {
}
}
- /** The #PCDATA characters. */
- private String characters;
- private FontData fontData;
-
/**
* Construct an FoPcdata object to contain the characters from a
* character data node. There is no corresponding Flow Obect in the
@@ -148,6 +133,9 @@ public class FoPcdata extends FOPageSeqNode {
makeSparsePropsSet();
}
+ /** The #PCDATA characters. */
+ private String characters;
+
/**
* Get the <tt>String</tt> data of the node.
* @return the string of characters.
@@ -155,42 +143,4 @@ public class FoPcdata extends FOPageSeqNode {
public String getCharacters() {
return characters;
}
-
- public static final boolean IS_ANTI_ALIASED = true;
- public static final boolean USES_FRACTIONAL_METRICS = true;
- // PCDATA provides sequences of inline-areas to fill line-areas in the
- // parent block area.
- // Generate a text-layout for the PCDATA.
- /**
- * Generates a TextMeasurer from the PCDATA text. The font and text
- * attributes of the text are applied.
- */
- private void processText() throws PropertyException, FontException {
- // Get the font, size, style and weight attributes
- Map attributes = getFontAttributes();
- Font font = getFopFont(attributes);
- // Add the text decorations
- // TODO separate color support for text decorations
- if (decorations.underlined()) {
- attributes.put(TextAttribute.UNDERLINE,
- TextAttribute.UNDERLINE_LOW_ONE_PIXEL);
- }
- if (decorations.overlined()) {
- // Not supported yet
- }
- if (decorations.struckthrough()) {
- attributes.put(TextAttribute.STRIKETHROUGH,
- TextAttribute.STRIKETHROUGH_ON);
- }
- AttributedString attText =
- new AttributedString(characters, attributes);
- AttributedCharacterIterator iter = attText.getIterator();
- FontRenderContext identityFRC =
- new FontRenderContext(
- null, IS_ANTI_ALIASED, USES_FRACTIONAL_METRICS);
- TextMeasurer measurer = new TextMeasurer(iter, identityFRC);
- TextLayout layout = new TextLayout(iter, identityFRC);
- // Find minima and maxima for this text
- }
-
}