pbwest 2004/05/29 11:56:11
Modified: src/java/org/apache/fop/fo/flow Tag: FOP_0-20-0_Alt-Design
FoPcdata.java
Log:
Removed fontData field.
Moved processText() to LineArea.
Revision Changes Path
No revision
No revision
1.1.2.14 +5 -55 xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoPcdata.java
Index: FoPcdata.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Attic/FoPcdata.java,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- FoPcdata.java 28 May 2004 15:27:05 -0000 1.1.2.13
+++ FoPcdata.java 29 May 2004 18:56:11 -0000 1.1.2.14
@@ -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.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 @@
}
}
- /** 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 @@
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 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
- }
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]