vmote 2003/08/14 08:31:10 Modified: src/java/org/apache/fop/fo PropertyManager.java TextInfo.java src/java/org/apache/fop/fo/flow Leader.java PageNumber.java PageNumberCitation.java src/java/org/apache/fop/fo/pagination Title.java src/java/org/apache/fop/layoutmgr BlockLayoutManager.java TextLayoutManager.java src/java/org/apache/fop/render/pdf PDFRenderer.java src/java/org/apache/fop/render/ps PSGraphics2D.java PSTextPainter.java src/java/org/apache/fop/svg PDFGraphics2D.java PDFTextPainter.java src/java/org/apache/fop/tools AreaTreeBuilder.java src/java/org/apache/fop/util CharUtilities.java Added: src/java/org/apache/fop/fonts Font.java Removed: src/java/org/apache/fop/layout FontState.java Log: move layout.FontState to fonts.Font Revision Changes Path 1.6 +4 -4 xml-fop/src/java/org/apache/fop/fo/PropertyManager.java Index: PropertyManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- PropertyManager.java 14 Aug 2003 07:42:58 -0000 1.5 +++ PropertyManager.java 14 Aug 2003 15:31:09 -0000 1.6 @@ -57,7 +57,7 @@ // FOP import org.apache.fop.area.CTM; import org.apache.fop.datatypes.FODimension; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.control.Document; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonMarginBlock; @@ -84,7 +84,7 @@ private PropertyList properties; private Document fontInfo = null; - private FontState fontState = null; + private Font fontState = null; private CommonBorderAndPadding borderAndPadding = null; private CommonHyphenation hyphProps = null; private TextInfo textInfo = null; @@ -133,7 +133,7 @@ * @param fontInfo FontInfo to work with * @return a FontState object */ - public FontState getFontState(Document fontInfo) { + public Font getFontState(Document fontInfo) { if (fontState == null) { if (fontInfo == null) { fontInfo = this.fontInfo; @@ -170,7 +170,7 @@ String fname = fontInfo.fontLookup(fontFamily, fontStyle, fontWeight); FontMetrics metrics = fontInfo.getMetricsFor(fname); - fontState = new FontState(fname, metrics, fontSize); + fontState = new Font(fname, metrics, fontSize); } return fontState; } 1.4 +2 -2 xml-fop/src/java/org/apache/fop/fo/TextInfo.java Index: TextInfo.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/TextInfo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TextInfo.java 15 Jul 2003 16:18:50 -0000 1.3 +++ TextInfo.java 14 Aug 2003 15:31:09 -0000 1.4 @@ -51,7 +51,7 @@ package org.apache.fop.fo; // FOP -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.datatypes.ColorType; import org.apache.fop.traits.SpaceVal; import org.apache.fop.fo.properties.TextTransform; @@ -61,7 +61,7 @@ */ public class TextInfo { /** object containing the font information */ - public FontState fs; + public Font fs; /** fo:color property */ public ColorType color; /** fo:wrap-option property */ 1.7 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/Leader.java Index: Leader.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Leader.java 14 Aug 2003 07:42:58 -0000 1.6 +++ Leader.java 14 Aug 2003 15:31:09 -0000 1.7 @@ -71,7 +71,7 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layoutmgr.ContentLayoutManager; @@ -96,7 +96,7 @@ /** FontInfo for this object */ protected Document fontInfo = null; /** FontState for this object */ - protected FontState fontState; + protected Font fontState; protected InlineArea leaderArea = null; /** 1.8 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PageNumber.java 14 Aug 2003 07:42:58 -0000 1.7 +++ PageNumber.java 14 Aug 2003 15:31:09 -0000 1.8 @@ -59,7 +59,7 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layout.TextState; @@ -84,7 +84,7 @@ /** FontInfo for this object */ protected Document fontInfo = null; /** FontState for this object */ - protected FontState fontState; + protected Font fontState; private float red; private float green; 1.8 +2 -2 xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java Index: PageNumberCitation.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PageNumberCitation.java 14 Aug 2003 07:42:58 -0000 1.7 +++ PageNumberCitation.java 14 Aug 2003 15:31:09 -0000 1.8 @@ -69,7 +69,7 @@ import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.fo.properties.CommonRelativePosition; import org.apache.fop.layout.TextState; @@ -91,7 +91,7 @@ /** FontInfo for this object **/ protected Document fontInfo = null; /** Fontstate for this object **/ - protected FontState fontState; + protected Font fontState; private float red; private float green; 1.4 +3 -3 xml-fop/src/java/org/apache/fop/fo/pagination/Title.java Index: Title.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Title.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Title.java 12 Aug 2003 18:02:45 -0000 1.3 +++ Title.java 14 Aug 2003 15:31:10 -0000 1.4 @@ -62,7 +62,7 @@ import org.apache.fop.fo.properties.CommonAural; import org.apache.fop.fo.properties.CommonBackground; import org.apache.fop.fo.properties.CommonBorderAndPadding; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.fo.properties.CommonMarginInline; import org.apache.fop.layoutmgr.ContentLayoutManager; import org.apache.fop.layoutmgr.InlineStackingLayoutManager; @@ -120,7 +120,7 @@ CommonBackground bProps = propMgr.getBackgroundProps(); // Common Font Properties - FontState fontState = propMgr.getFontState(foInputHandler.getFontInfo()); + Font fontState = propMgr.getFontState(foInputHandler.getFontInfo()); // Common Margin Properties-Inline CommonMarginInline mProps = propMgr.getMarginInlineProps(); 1.3 +137 -14 xml-fop/src/java/org/apache/fop/fonts/Font.java 1.3 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Index: BlockLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BlockLayoutManager.java 12 Aug 2003 18:02:45 -0000 1.2 +++ BlockLayoutManager.java 14 Aug 2003 15:31:10 -0000 1.3 @@ -63,6 +63,7 @@ import org.apache.fop.traits.LayoutProps; import org.apache.fop.fo.properties.CommonBorderAndPadding; import org.apache.fop.fo.properties.CommonBackground; +import org.apache.fop.fonts.*; /** * LayoutManager for a block FO. 1.2 +1 -0 xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java Index: TextLayoutManager.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TextLayoutManager.java 11 Mar 2003 13:05:24 -0000 1.1 +++ TextLayoutManager.java 14 Aug 2003 15:31:10 -0000 1.2 @@ -59,6 +59,7 @@ import org.apache.fop.area.inline.Word; import org.apache.fop.area.inline.Space; import org.apache.fop.util.CharUtilities; +import org.apache.fop.fonts.*; /** * LayoutManager for text (a sequence of characters) which generates one 1.8 +3 -3 xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- PDFRenderer.java 14 Aug 2003 14:59:56 -0000 1.7 +++ PDFRenderer.java 14 Aug 2003 15:31:10 -0000 1.8 @@ -114,7 +114,7 @@ import org.apache.fop.area.inline.Image; import org.apache.fop.area.inline.Leader; import org.apache.fop.area.inline.InlineParent; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.traits.BorderProps; import org.apache.fop.datatypes.ColorType; @@ -920,7 +920,7 @@ String s = word.getWord(); FontMetrics metrics = fontInfo.getMetricsFor(name); - FontState fs = new FontState(name, metrics, size); + Font fs = new Font(name, metrics, size); escapeText(s, fs, useMultiByte, pdf); pdf.append(endText); @@ -936,7 +936,7 @@ * @param useMultiByte Indicates the use of multi byte convention * @param pdf target buffer for the escaped text */ - public void escapeText(String s, FontState fs, + public void escapeText(String s, Font fs, boolean useMultiByte, StringBuffer pdf) { String startText = useMultiByte ? "<" : "("; String endText = useMultiByte ? "> " : ") "; 1.4 +8 -7 xml-fop/src/java/org/apache/fop/render/ps/PSGraphics2D.java Index: PSGraphics2D.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSGraphics2D.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PSGraphics2D.java 14 Aug 2003 07:42:58 -0000 1.3 +++ PSGraphics2D.java 14 Aug 2003 15:31:10 -0000 1.4 @@ -58,7 +58,8 @@ import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; -import java.awt.Font; +/* java.awt.Font is not imported to avoid confusion with + org.apache.fop.fonts.Font */ import java.awt.GradientPaint; import java.awt.Graphics; import java.awt.Graphics2D; @@ -84,7 +85,7 @@ // FOP import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; // Batik import org.apache.batik.ext.awt.g2d.AbstractGraphics2D; @@ -113,10 +114,10 @@ protected PSGenerator gen; /** Currently valid FontState */ - protected FontState fontState; + protected Font fontState; /** Overriding FontState */ - protected FontState overrideFontState = null; + protected Font overrideFontState = null; /** * the current (internal) font name @@ -826,7 +827,7 @@ public void drawString(String s, float x, float y) { try { if (overrideFontState == null) { - Font gFont = getFont(); + java.awt.Font gFont = getFont(); String n = gFont.getFamily(); if (n.equals("sanserif")) { n = "sans-serif"; @@ -1088,7 +1089,7 @@ * Sets the overrideing font state. * @param infont FontState to set */ - public void setOverrideFontState(FontState infont) { + public void setOverrideFontState(Font infont) { overrideFontState = infont; } @@ -1100,7 +1101,7 @@ * @see java.awt.FontMetrics * @see java.awt.Graphics#getFontMetrics() */ - public java.awt.FontMetrics getFontMetrics(Font f) { + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { return fmg.getFontMetrics(f); } 1.4 +13 -12 xml-fop/src/java/org/apache/fop/render/ps/PSTextPainter.java Index: PSTextPainter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSTextPainter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PSTextPainter.java 14 Aug 2003 07:42:58 -0000 1.3 +++ PSTextPainter.java 14 Aug 2003 15:31:10 -0000 1.4 @@ -53,7 +53,8 @@ import java.awt.Graphics2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; -import java.awt.Font; +/* java.awt.Font is not imported to avoid confusion with + org.apache.fop.fonts.Font */ import java.text.AttributedCharacterIterator; import java.awt.font.TextAttribute; @@ -73,7 +74,7 @@ import org.apache.batik.gvt.renderer.StrokingTextPainter; import org.apache.fop.fonts.FontMetrics; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.control.Document; /** @@ -189,7 +190,7 @@ && (taWeight.floatValue() > 1.0)) ? Document.BOLD : Document.NORMAL; - FontState fontState = null; + Font fontState = null; Document fi = fontInfo; boolean found = false; String fontFamily = null; @@ -207,7 +208,7 @@ weight); FontMetrics metrics = fontInfo.getMetricsFor(fname); int fsize = (int)(size.floatValue() * 1000); - fontState = new FontState(fname, metrics, fsize); + fontState = new Font(fname, metrics, fsize); found = true; break; } @@ -218,27 +219,27 @@ fontInfo.fontLookup("any", style, Document.NORMAL); FontMetrics metrics = fontInfo.getMetricsFor(fname); int fsize = (int)(size.floatValue() * 1000); - fontState = new FontState(fname, metrics, fsize); + fontState = new Font(fname, metrics, fsize); } else { if (g2d instanceof PSGraphics2D) { ((PSGraphics2D) g2d).setOverrideFontState(fontState); } } - int fStyle = Font.PLAIN; + int fStyle = java.awt.Font.PLAIN; if (weight == Document.BOLD) { if (style.equals("italic")) { - fStyle = Font.BOLD | Font.ITALIC; + fStyle = java.awt.Font.BOLD | java.awt.Font.ITALIC; } else { - fStyle = Font.BOLD; + fStyle = java.awt.Font.BOLD; } } else { if (style.equals("italic")) { - fStyle = Font.ITALIC; + fStyle = java.awt.Font.ITALIC; } else { - fStyle = Font.PLAIN; + fStyle = java.awt.Font.PLAIN; } } - Font font = new Font(fontFamily, fStyle, + java.awt.Font font = new java.awt.Font(fontFamily, fStyle, (int)(fontState.getFontSize() / 1000)); g2d.setFont(font); @@ -288,7 +289,7 @@ return hasunsupported; } - private float getStringWidth(String str, FontState fontState) { + private float getStringWidth(String str, Font fontState) { float wordWidth = 0; float whitespaceWidth = fontState.getWidth(fontState.mapChar(' ')); 1.7 +11 -10 xml-fop/src/java/org/apache/fop/svg/PDFGraphics2D.java Index: PDFGraphics2D.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFGraphics2D.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PDFGraphics2D.java 14 Aug 2003 14:59:56 -0000 1.6 +++ PDFGraphics2D.java 14 Aug 2003 15:31:10 -0000 1.7 @@ -65,7 +65,7 @@ import org.apache.fop.pdf.PDFAnnotList; import org.apache.fop.pdf.BitmapImage; import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.render.pdf.FontSetup; import org.apache.fop.fonts.FontMetrics; import org.apache.fop.fonts.LazyFont; @@ -87,7 +87,8 @@ import java.awt.Graphics2D; import java.awt.Color; import java.awt.GraphicsConfiguration; -import java.awt.Font; +/* java.awt.Font is not imported to avoid confusion with + org.apache.fop.fonts.Font */ import java.awt.Image; import java.awt.Shape; import java.awt.Stroke; @@ -159,7 +160,7 @@ * The override font state used when drawing text and the font cannot be * set using java fonts. */ - protected FontState ovFontState = null; + protected Font ovFontState = null; /** * the current stream to add PDF commands to @@ -266,7 +267,7 @@ * * @param infont the font state to use */ - public void setOverrideFontState(FontState infont) { + public void setOverrideFontState(Font infont) { ovFontState = infont; } @@ -1198,9 +1199,9 @@ public void drawString(String s, float x, float y) { // System.out.println("drawString(String)"); - FontState fontState; + Font fontState; if (ovFontState == null) { - Font gFont = getFont(); + java.awt.Font gFont = getFont(); String n = gFont.getFamily(); if (n.equals("sanserif")) { n = "sans-serif"; @@ -1210,10 +1211,10 @@ int weight = gFont.isBold() ? Document.BOLD : Document.NORMAL; String fname = fontInfo.fontLookup(n, style, weight); FontMetrics metrics = fontInfo.getMetricsFor(fname); - fontState = new FontState(fname, metrics, siz * 1000); + fontState = new Font(fname, metrics, siz * 1000); } else { FontMetrics metrics = fontInfo.getMetricsFor(ovFontState.getFontName()); - fontState = new FontState(ovFontState.getFontName(), + fontState = new Font(ovFontState.getFontName(), metrics, ovFontState.getFontSize()); ovFontState = null; } @@ -1367,7 +1368,7 @@ float y) { System.err.println("drawString(AttributedCharacterIterator)"); - FontState fontState = null; + Font fontState = null; Shape imclip = getClip(); writeClip(imclip); @@ -1587,7 +1588,7 @@ * @see java.awt.FontMetrics * @see java.awt.Graphics#getFontMetrics() */ - public java.awt.FontMetrics getFontMetrics(Font f) { + public java.awt.FontMetrics getFontMetrics(java.awt.Font f) { return fmg.getFontMetrics(f); } 1.4 +13 -13 xml-fop/src/java/org/apache/fop/svg/PDFTextPainter.java Index: PDFTextPainter.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTextPainter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PDFTextPainter.java 14 Aug 2003 07:42:58 -0000 1.3 +++ PDFTextPainter.java 14 Aug 2003 15:31:10 -0000 1.4 @@ -53,8 +53,8 @@ import java.awt.Graphics2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; -import java.awt.Font; - +/* java.awt.Font is not imported to avoid confusion with + org.apache.fop.fonts.Font */ import java.text.AttributedCharacterIterator; import java.awt.font.TextAttribute; import java.awt.Shape; @@ -73,7 +73,7 @@ import org.apache.batik.gvt.renderer.StrokingTextPainter; import org.apache.fop.fonts.FontMetrics; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.control.Document; /** @@ -189,7 +189,7 @@ && (taWeight.floatValue() > 1.0)) ? Document.BOLD : Document.NORMAL; - FontState fontState = null; + Font fontState = null; Document fi = fontInfo; boolean found = false; String fontFamily = null; @@ -207,7 +207,7 @@ weight); FontMetrics metrics = fontInfo.getMetricsFor(fname); int fsize = (int)(size.floatValue() * 1000); - fontState = new FontState(fname, metrics, fsize); + fontState = new Font(fname, metrics, fsize); found = true; break; } @@ -218,27 +218,27 @@ fontInfo.fontLookup("any", style, Document.NORMAL); FontMetrics metrics = fontInfo.getMetricsFor(fname); int fsize = (int)(size.floatValue() * 1000); - fontState = new FontState(fname, metrics, fsize); + fontState = new Font(fname, metrics, fsize); } else { if (g2d instanceof PDFGraphics2D) { ((PDFGraphics2D) g2d).setOverrideFontState(fontState); } } - int fStyle = Font.PLAIN; + int fStyle = java.awt.Font.PLAIN; if (weight == Document.BOLD) { if (style.equals("italic")) { - fStyle = Font.BOLD | Font.ITALIC; + fStyle = java.awt.Font.BOLD | java.awt.Font.ITALIC; } else { - fStyle = Font.BOLD; + fStyle = java.awt.Font.BOLD; } } else { if (style.equals("italic")) { - fStyle = Font.ITALIC; + fStyle = java.awt.Font.ITALIC; } else { - fStyle = Font.PLAIN; + fStyle = java.awt.Font.PLAIN; } } - Font font = new Font(fontFamily, fStyle, + java.awt.Font font = new java.awt.Font(fontFamily, fStyle, (int)(fontState.getFontSize() / 1000)); g2d.setFont(font); @@ -288,7 +288,7 @@ return hasunsupported; } - private float getStringWidth(String str, FontState fontState) { + private float getStringWidth(String str, Font fontState) { float wordWidth = 0; float whitespaceWidth = fontState.getWidth(fontState.mapChar(' ')); 1.3 +4 -4 xml-fop/src/java/org/apache/fop/tools/AreaTreeBuilder.java Index: AreaTreeBuilder.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/tools/AreaTreeBuilder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AreaTreeBuilder.java 14 Aug 2003 07:42:59 -0000 1.2 +++ AreaTreeBuilder.java 14 Aug 2003 15:31:10 -0000 1.3 @@ -101,7 +101,7 @@ import org.apache.fop.area.inline.Viewport; import org.apache.fop.area.inline.Word; import org.apache.fop.control.Document; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; import org.apache.fop.render.Renderer; import org.apache.fop.render.pdf.PDFRenderer; import org.apache.fop.render.svg.SVGRenderer; @@ -249,7 +249,7 @@ private AreaTree areaTree; private AreaTreeModel model; private Document fontInfo; - private FontState currentFontState; + private Font currentFontState; TreeLoader(Document fi) { fontInfo = fi; @@ -562,7 +562,7 @@ String fname = fontInfo.fontLookup("sans-serif", "normal", Document.NORMAL); FontMetrics metrics = fontInfo.getMetricsFor(fname); currentFontState = - new FontState(fname, metrics, 12000); + new Font(fname, metrics, 12000); ch.setWidth(currentFontState.getWidth(ch.getChar())); ch.setOffset(currentFontState.getCapHeight()); @@ -587,7 +587,7 @@ String fname = fontInfo.fontLookup("sans-serif", "normal", Document.NORMAL); FontMetrics metrics = fontInfo.getMetricsFor(fname); currentFontState = - new FontState(fname, metrics, 12000); + new Font(fname, metrics, 12000); Word word = getWord((Element) obj); word.addTrait(Trait.FONT_NAME, fname); 1.4 +2 -2 xml-fop/src/java/org/apache/fop/util/CharUtilities.java Index: CharUtilities.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/util/CharUtilities.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CharUtilities.java 4 Jul 2003 19:56:17 -0000 1.3 +++ CharUtilities.java 14 Aug 2003 15:31:10 -0000 1.4 @@ -50,7 +50,7 @@ */ package org.apache.fop.util; -import org.apache.fop.layout.FontState; +import org.apache.fop.fonts.Font; /** * This class provides utilities to distinguish various kinds of Unicode @@ -117,7 +117,7 @@ * @param fs FontState to use * @return the width of the character */ - public static int getCharWidth(char c, FontState fs) { + public static int getCharWidth(char c, Font fs) { int width; if ((c == '\n') || (c == '\r') || (c == '\t') || (c == '\u00A0')) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]