aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/font
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/font')
-rw-r--r--libjava/java/awt/font/FontRenderContext.java115
-rw-r--r--libjava/java/awt/font/GlyphJustificationInfo.java77
-rw-r--r--libjava/java/awt/font/GlyphMetrics.java134
-rw-r--r--libjava/java/awt/font/GlyphVector.java145
-rw-r--r--libjava/java/awt/font/GraphicAttribute.java84
-rw-r--r--libjava/java/awt/font/ImageGraphicAttribute.java109
-rw-r--r--libjava/java/awt/font/LineBreakMeasurer.java113
-rw-r--r--libjava/java/awt/font/LineMetrics.java67
-rw-r--r--libjava/java/awt/font/MultipleMaster.java61
-rw-r--r--libjava/java/awt/font/NumericShaper.java137
-rw-r--r--libjava/java/awt/font/OpenType.java111
-rw-r--r--libjava/java/awt/font/ShapeGraphicAttribute.java105
-rw-r--r--libjava/java/awt/font/TextAttribute.java121
-rw-r--r--libjava/java/awt/font/TextLayout.java321
-rw-r--r--libjava/java/awt/font/TextMeasurer.java97
-rw-r--r--libjava/java/awt/font/TransformAttribute.java73
16 files changed, 1870 insertions, 0 deletions
diff --git a/libjava/java/awt/font/FontRenderContext.java b/libjava/java/awt/font/FontRenderContext.java
new file mode 100644
index 0000000..b8202a8
--- /dev/null
+++ b/libjava/java/awt/font/FontRenderContext.java
@@ -0,0 +1,115 @@
+/* FontRenderContext.java
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.geom.AffineTransform;
+
+/**
+ * @author Michael Koch
+ */
+public class FontRenderContext
+{
+ private AffineTransform affineTransform;
+ private boolean isAntiAliased;
+ private boolean usesFractionalMetrics;
+
+ /**
+ * Construct a new <code>FontRenderContext</code>.
+ */
+ protected FontRenderContext()
+ {
+ // Do nothing here.
+ }
+
+ /**
+ * Construct a new <code>FontRenderContext</code>.
+ */
+ public FontRenderContext (AffineTransform tx, boolean isAntiAliased,
+ boolean usesFractionalMetrics)
+ {
+ if (tx != null
+ && !tx.isIdentity ())
+ {
+ this.affineTransform = new AffineTransform (tx);
+ }
+
+ this.isAntiAliased = isAntiAliased;
+ this.usesFractionalMetrics = usesFractionalMetrics;
+ }
+
+ public boolean equals (Object obj)
+ {
+ if (! (obj instanceof FontRenderContext))
+ return false;
+
+ return equals ((FontRenderContext) obj);
+ }
+
+ public boolean equals (FontRenderContext rhs)
+ {
+ return (affineTransform.equals (rhs.getTransform ())
+ && isAntiAliased == rhs.isAntiAliased ()
+ && usesFractionalMetrics == rhs.usesFractionalMetrics ());
+ }
+
+ public AffineTransform getTransform ()
+ {
+ return affineTransform;
+ }
+
+ /**
+ * Returns the hash code of the font render context.
+ */
+ public int hashCode ()
+ {
+ // FIXME: check what SUN does here.
+ return affineTransform == null ? 0 : affineTransform.hashCode ();
+ }
+
+ public boolean isAntiAliased ()
+ {
+ return isAntiAliased;
+ }
+
+ public boolean usesFractionalMetrics ()
+ {
+ return usesFractionalMetrics;
+ }
+}
+
diff --git a/libjava/java/awt/font/GlyphJustificationInfo.java b/libjava/java/awt/font/GlyphJustificationInfo.java
new file mode 100644
index 0000000..e95a2c9
--- /dev/null
+++ b/libjava/java/awt/font/GlyphJustificationInfo.java
@@ -0,0 +1,77 @@
+/* GlyphJustificationInfo.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+/**
+ * @author Michael Koch
+ */
+public final class GlyphJustificationInfo
+{
+ public static final int PRIORITY_KASHIDA = 0;
+ public static final int PRIORITY_WHITESPACE = 1;
+ public static final int PRIORITY_INTERCHAR = 2;
+ public static final int PRIORITY_NONE = 3;
+
+ public final float weight;
+ public final int growPriority;
+ public final boolean growAbsorb;
+ public final float growLeftLimit;
+ public final float growRightLimit;
+ public final int shrinkPriority;
+ public final boolean shrinkAbsorb;
+ public final float shrinkLeftLimit;
+ public final float shrinkRightLimit;
+
+ public GlyphJustificationInfo (float weight, boolean growAbsorb,
+ int growPriority, float growLeftLimit,
+ float growRightLimit, boolean shrinkAbsorb,
+ int shrinkPriority, float shrinkLeftLimit,
+ float shrinkRightLimit)
+ {
+ this.weight = weight;
+ this.growAbsorb = growAbsorb;
+ this.growPriority = growPriority;
+ this.growLeftLimit = growLeftLimit;
+ this.growRightLimit = growRightLimit;
+ this.shrinkAbsorb = shrinkAbsorb;
+ this.shrinkPriority = shrinkPriority;
+ this.shrinkLeftLimit = shrinkLeftLimit;
+ this.shrinkRightLimit = shrinkRightLimit;
+ }
+}
diff --git a/libjava/java/awt/font/GlyphMetrics.java b/libjava/java/awt/font/GlyphMetrics.java
new file mode 100644
index 0000000..975f098
--- /dev/null
+++ b/libjava/java/awt/font/GlyphMetrics.java
@@ -0,0 +1,134 @@
+/* GlyphMetrics.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public final class GlyphMetrics
+{
+ public static final byte COMBINING = 2;
+ public static final byte COMPONENT = 3;
+ public static final byte LIGATURE = 1;
+ public static final byte STANDARD = 0;
+ public static final byte WHITESPACE = 4;
+
+ private boolean horizontal;
+ private float advanceX;
+ private float advanceY;
+ private Rectangle2D bounds;
+ private byte glyphType;
+
+ public GlyphMetrics (boolean horizontal, float advanceX, float advanceY,
+ Rectangle2D bounds, byte glyphType)
+ {
+ this.horizontal = horizontal;
+ this.advanceX = advanceX;
+ this.advanceY = advanceY;
+ this.bounds = bounds;
+ this.glyphType = glyphType;
+ }
+
+ public GlyphMetrics (float advance, Rectangle2D bounds, byte glyphType)
+ {
+ this (true, advance, advance, bounds, glyphType);
+ }
+
+ public float getAdvance ()
+ {
+ return horizontal ? advanceX : advanceY;
+ }
+
+ public float getAdvanceX ()
+ {
+ return advanceX;
+ }
+
+ public float getAdvanceY ()
+ {
+ return advanceY;
+ }
+
+ public Rectangle2D getBounds2D ()
+ {
+ return bounds;
+ }
+
+ public float getLSB ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getRSB ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int getType ()
+ {
+ return glyphType;
+ }
+
+ public boolean isCombining ()
+ {
+ return (glyphType == COMBINING);
+ }
+
+ public boolean isComponent ()
+ {
+ return (glyphType == COMPONENT);
+ }
+
+ public boolean isLigature()
+ {
+ return (glyphType == LIGATURE);
+ }
+
+ public boolean isStandard()
+ {
+ return (glyphType == STANDARD);
+ }
+
+ public boolean isWhitespace()
+ {
+ return (glyphType == WHITESPACE);
+ }
+}
diff --git a/libjava/java/awt/font/GlyphVector.java b/libjava/java/awt/font/GlyphVector.java
new file mode 100644
index 0000000..ae103b8
--- /dev/null
+++ b/libjava/java/awt/font/GlyphVector.java
@@ -0,0 +1,145 @@
+/* GlyphVector.java
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class GlyphVector implements Cloneable
+{
+ public static final int FLAG_COMPLEX_GLYPHS = 8;
+ public static final int FLAG_HAS_POSITION_ADJUSTMENTS = 2;
+ public static final int FLAG_HAS_TRANSFORMS = 1;
+ public static final int FLAG_MASK = 15;
+ public static final int FLAG_RUN_RTL = 4;
+
+ /**
+ * Constructs a <code>GlyphVector</code> object.
+ */
+ public GlyphVector ()
+ {
+ }
+
+ public abstract boolean equals (GlyphVector set);
+
+ public abstract Font getFont ();
+
+ public abstract FontRenderContext getFontRenderContext ();
+
+ public int getGlyphCharIndex (int glyphIndex)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int[] getGlyphCharIndices (int beginGlyphIndex, int numEntries,
+ int[] codeReturn)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public abstract int getGlyphCode (int glyphIndex);
+
+ public abstract int[] getGlyphCodes (int beginGlyphIndex, int numEntries,
+ int[] codeReturn);
+
+ public abstract GlyphJustificationInfo getGlyphJustificationInfo
+ (int glyphIndex);
+
+ public abstract Shape getGlyphLogicalBounds (int glyphIndex);
+
+ public abstract GlyphMetrics getGlyphMetrics (int glyphIndex);
+
+ public abstract Shape getGlyphOutline (int glyphIndex);
+
+ public Shape getGlyphOutline (int glyphIndex, float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Rectangle getGlyphPixelBounds (int index, FontRenderContext renderFRC,
+ float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public abstract Point2D getGlyphPosition (int glyphIndex);
+
+ public abstract float[] getGlyphPositions (int beginGlyphIndex,
+ int numEntries,
+ float[] positionReturn);
+
+ public abstract AffineTransform getGlyphTransform (int glyphIndex);
+
+ public abstract Shape getGlyphVisualBounds (int glyphIndex);
+
+ public int getLayoutFlags ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public abstract Rectangle2D getLogicalBounds ();
+
+ public abstract int getNumGlyphs ();
+
+ public abstract Shape getOutline ();
+
+ public abstract Shape getOutline (float x, float y);
+
+ public Rectangle getPixelBounds (FontRenderContext renderFRC,
+ float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public abstract Rectangle2D getVisualBounds ();
+
+ public abstract void performDefaultLayout ();
+
+ public abstract void setGlyphPosition (int glyphIndex, Point2D newPos);
+
+ public abstract void setGlyphTransform (int glyphIndex,
+ AffineTransform newTX);
+}
diff --git a/libjava/java/awt/font/GraphicAttribute.java b/libjava/java/awt/font/GraphicAttribute.java
new file mode 100644
index 0000000..377b8da
--- /dev/null
+++ b/libjava/java/awt/font/GraphicAttribute.java
@@ -0,0 +1,84 @@
+/* GraphicAttribute.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class GraphicAttribute
+{
+ public static final int BOTTOM_ALIGNMENT = -2;
+ public static final int CENTER_BASELINE = 1;
+ public static final int HANGING_BASELINE = 2;
+ public static final int ROMAN_BASELINE = 0;
+ public static final int TOP_ALIGNMENT = -1;
+
+ private int alignment;
+
+ protected GraphicAttribute (int alignment)
+ {
+ this.alignment = alignment;
+ }
+
+ public abstract void draw (Graphics2D graphics, float x, float y);
+
+ public abstract float getAdvance ();
+
+ public int getAlignment ()
+ {
+ return alignment;
+ }
+
+ public abstract float getAscent ();
+
+ public Rectangle2D getBounds ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public abstract float getDescent ();
+
+ public GlyphJustificationInfo getJustificationInfo ()
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/ImageGraphicAttribute.java b/libjava/java/awt/font/ImageGraphicAttribute.java
new file mode 100644
index 0000000..ca5b95f
--- /dev/null
+++ b/libjava/java/awt/font/ImageGraphicAttribute.java
@@ -0,0 +1,109 @@
+/* ImageGraphicAttribute.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public class ImageGraphicAttribute extends GraphicAttribute
+{
+ private Image image;
+
+ public ImageGraphicAttribute (Image image, int alignment)
+ {
+ super (alignment);
+ this.image = image;
+ }
+
+ public ImageGraphicAttribute (Image image, int alignment, float originX,
+ float originY)
+ {
+ super (alignment);
+ this.image = image;
+
+ throw new Error ("not implemented");
+ }
+
+ public void draw (Graphics2D graphics, float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean equals (Object obj)
+ {
+ if (! (obj instanceof ImageGraphicAttribute))
+ return false;
+
+ return equals ((ImageGraphicAttribute) obj);
+ }
+
+ public boolean equals (ImageGraphicAttribute rhs)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAdvance ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAscent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Rectangle2D getBounds ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getDescent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int hashCode ()
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/LineBreakMeasurer.java b/libjava/java/awt/font/LineBreakMeasurer.java
new file mode 100644
index 0000000..19f1525
--- /dev/null
+++ b/libjava/java/awt/font/LineBreakMeasurer.java
@@ -0,0 +1,113 @@
+/* LineBreakMeasurer.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.text.AttributedCharacterIterator;
+import java.text.BreakIterator;
+
+public final class LineBreakMeasurer
+{
+ private AttributedCharacterIterator ci;
+ private FontRenderContext frc;
+ private BreakIterator bi;
+
+ /**
+ * Constructs a <code>LineBreakMeasurer</code> object.
+ */
+ public LineBreakMeasurer (AttributedCharacterIterator text,
+ FontRenderContext frc)
+ {
+ this (text, null, frc);
+ }
+
+ /**
+ * Constructs a <code>LineBreakMeasurer</code> object.
+ */
+ public LineBreakMeasurer (AttributedCharacterIterator text,
+ BreakIterator breakIter, FontRenderContext frc)
+ {
+ this.ci = text;
+ this.bi = breakIter;
+ this.frc = frc;
+ }
+
+ public void deleteChar (AttributedCharacterIterator newParagraph,
+ int deletePos)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int getPosition ()
+ {
+ return ci.getIndex ();
+ }
+
+ public void insertChar (AttributedCharacterIterator newParagraph,
+ int insertPos)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextLayout nextLayout (float wrappingWidth)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextLayout nextLayout (float wrappingWidth, int offsetLimit,
+ boolean requireNextWord)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int nextOffset (float wrappingWidth)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int nextOffset (float wrappingWidth, int offsetLimit,
+ boolean requireNextWord)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public void setPosition (int newPosition)
+ {
+ ci.setIndex (newPosition);
+ }
+}
diff --git a/libjava/java/awt/font/LineMetrics.java b/libjava/java/awt/font/LineMetrics.java
new file mode 100644
index 0000000..580de8f
--- /dev/null
+++ b/libjava/java/awt/font/LineMetrics.java
@@ -0,0 +1,67 @@
+/* LineMetrics.java -- Information about about a line display characteristics
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class LineMetrics
+{
+ public abstract float getAscent();
+
+ public abstract int getBaselineIndex();
+
+ public abstract float[] getBaselineOffsets();
+
+ public abstract float getDescent();
+
+ public abstract float getHeight();
+
+ public abstract float getLeading();
+
+ public abstract int getNumChars();
+
+ public abstract float getStrikethroughOffset();
+
+ public abstract float getStrikethroughThickness();
+
+ public abstract float getUnderlineOffset();
+
+ public abstract float getUnderlineThickness();
+}
diff --git a/libjava/java/awt/font/MultipleMaster.java b/libjava/java/awt/font/MultipleMaster.java
new file mode 100644
index 0000000..4fe6916
--- /dev/null
+++ b/libjava/java/awt/font/MultipleMaster.java
@@ -0,0 +1,61 @@
+/* MultipleMaster.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Font;
+
+/**
+ * @author Michael Koch
+ */
+public interface MultipleMaster
+{
+ public Font deriveMMFont (float[] axes);
+
+ public Font deriveMMFont (float[] glyphWidths, float avgStemWidth,
+ float typicalCapHeight, float typicalXHeight,
+ float italicAngle);
+
+ public float[] getDesignAxisDefaults ();
+
+ public String[] getDesignAxisNames ();
+
+ public float[] getDesignAxisRanges ();
+
+ public int getNumDesignAxes ();
+}
diff --git a/libjava/java/awt/font/NumericShaper.java b/libjava/java/awt/font/NumericShaper.java
new file mode 100644
index 0000000..de934f2
--- /dev/null
+++ b/libjava/java/awt/font/NumericShaper.java
@@ -0,0 +1,137 @@
+/* NumericShaper.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.io.Serializable;
+
+/**
+ * @author Michael Koch
+ * @since 1.4
+ */
+public final class NumericShaper implements Serializable
+{
+ private static final long serialVersionUID = -8022764705923730308L;
+
+ public static final int ALL_RANGES = 524287;
+ public static final int ARABIC = 2;
+ public static final int BENGALI = 16;
+ public static final int DEVANAGARI = 8;
+ public static final int EASTERN_ARABIC = 4;
+ public static final int ETHIOPIC = 65536;
+ public static final int EUROPEAN = 1;
+ public static final int GUJARATI = 64;
+ public static final int GURMUKHI = 32;
+ public static final int KANNADA = 1024;
+ public static final int KHMER = 131072;
+ public static final int LAO = 8192;
+ public static final int MALAYALAM = 2048;
+ public static final int MONGOLIAN = 262144;
+ public static final int MYANMAR = 32768;
+ public static final int ORIYA = 128;
+ public static final int TAMIL = 256;
+ public static final int TELUGU = 512;
+ public static final int THAI = 4096;
+ public static final int TIBETAN = 16384;
+
+ private int ranges;
+ private int context;
+
+ private NumericShaper (int ranges, int context)
+ {
+ this.ranges = ranges;
+ this.context = context;
+ }
+
+ public boolean equals (Object obj)
+ {
+ if (! (obj instanceof NumericShaper))
+ return false;
+
+ NumericShaper tmp = (NumericShaper) obj;
+
+ return (ranges == tmp.ranges
+ && context == tmp.context);
+ }
+
+ public static NumericShaper getContextualShaper (int ranges)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public static NumericShaper getContextualShaper (int ranges,
+ int defaultContext)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int getRanges ()
+ {
+ return ranges;
+ }
+
+ public static NumericShaper getShaper (int singleRange)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int hashCode ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean isContextual ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public void shape (char[] text, int start, int count)
+ {
+ shape (text, start, count, context);
+ }
+
+ public void shape (char[] text, int start, int count, int context)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public String toString ()
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/OpenType.java b/libjava/java/awt/font/OpenType.java
new file mode 100644
index 0000000..df5ed52
--- /dev/null
+++ b/libjava/java/awt/font/OpenType.java
@@ -0,0 +1,111 @@
+/* OpenType.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+/**
+ * @author Michael Koch
+ */
+public interface OpenType
+{
+ int TAG_ACNT = 1633906292;
+ int TAG_AVAR = 1635148146;
+ int TAG_BASE = 1111577413;
+ int TAG_BDAT = 1650745716;
+ int TAG_BLOC = 1651273571;
+ int TAG_BSLN = 1651731566;
+ int TAG_CFF = 1128678944;
+ int TAG_CMAP = 1668112752;
+ int TAG_CVAR = 1668702578;
+ int TAG_CVT = 1668707360;
+ int TAG_DSIG = 1146308935;
+ int TAG_EBDT = 1161970772;
+ int TAG_EBLC = 1161972803;
+ int TAG_EBSC = 1161974595;
+ int TAG_FDSC = 1717859171;
+ int TAG_FEAT = 1717920116;
+ int TAG_FMTX = 1718449272;
+ int TAG_FPGM = 1718642541;
+ int TAG_FVAR = 1719034226;
+ int TAG_GASP = 1734439792;
+ int TAG_GDEF = 1195656518;
+ int TAG_GLYF = 1735162214;
+ int TAG_GPOS = 1196445523;
+ int TAG_GSUB = 1196643650;
+ int TAG_GVAR = 1735811442;
+ int TAG_HDMX = 1751412088;
+ int TAG_HEAD = 1751474532;
+ int TAG_HHEA = 1751672161;
+ int TAG_HMTX = 1752003704;
+ int TAG_JSTF = 1246975046;
+ int TAG_JUST = 1786082164;
+ int TAG_KERN = 1801810542;
+ int TAG_LCAR = 1818452338;
+ int TAG_LOCA = 1819239265;
+ int TAG_LTSH = 1280594760;
+ int TAG_MAXP = 1835104368;
+ int TAG_MMFX = 1296909912;
+ int TAG_MMSD = 1296913220;
+ int TAG_MORT = 1836020340;
+ int TAG_NAME = 1851878757;
+ int TAG_OPBD = 1836020340;
+ int TAG_OS2 = 1330851634;
+ int TAG_PCLT = 1346587732;
+ int TAG_POST = 1886352244;
+ int TAG_PREP = 1886545264;
+ int TAG_PROP = 1886547824;
+ int TAG_TRAK = 1953653099;
+ int TAG_TYP1 = 1954115633;
+ int TAG_VDMX = 1447316824;
+ int TAG_VHEA = 1986553185;
+ int TAG_VMTX = 1986884728;
+
+ public byte[] getFontTable (int sfntTag);
+
+ public byte[] getFontTable (int sfntTag, int offset, int count);
+
+ public byte[] getFontTable (String strSfntTag);
+
+ public byte[] getFontTable (String strSfntTag, int offset, int count);
+
+ public int getFontTableSize (int sfntTag);
+
+ public int getFontTableSize (String strSfntTag);
+
+ public int getVersion ();
+}
diff --git a/libjava/java/awt/font/ShapeGraphicAttribute.java b/libjava/java/awt/font/ShapeGraphicAttribute.java
new file mode 100644
index 0000000..12ae9cd
--- /dev/null
+++ b/libjava/java/awt/font/ShapeGraphicAttribute.java
@@ -0,0 +1,105 @@
+/* ShapeGraphicAttribute.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.Rectangle2D;
+
+public final class ShapeGraphicAttribute extends GraphicAttribute
+{
+ public static final boolean FILL = false;
+ public static final boolean STROKE = true;
+
+ private Shape shape;
+ private boolean stroke;
+
+ public ShapeGraphicAttribute (Shape shape, int alignment, boolean stroke)
+ {
+ super (alignment);
+ this.shape = shape;
+ this.stroke = stroke;
+ }
+
+ public void draw (Graphics2D graphics, float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean equals (Object obj)
+ {
+ if (! (obj instanceof ShapeGraphicAttribute))
+ return false;
+
+ return equals ((ShapeGraphicAttribute) obj);
+ }
+
+ public boolean equals (ShapeGraphicAttribute rhs)
+ {
+ return (shape.equals (rhs.shape)
+ && getAlignment () == rhs.getAlignment ()
+ && stroke == rhs.stroke);
+ }
+
+ public float getAdvance ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAscent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Rectangle2D getBounds ()
+ {
+ return shape.getBounds2D ();
+ }
+
+ public float getDescent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int hashCode ()
+ {
+ // FIXME: Check what SUN does here
+ return shape.hashCode ();
+ }
+}
diff --git a/libjava/java/awt/font/TextAttribute.java b/libjava/java/awt/font/TextAttribute.java
new file mode 100644
index 0000000..ccc8049
--- /dev/null
+++ b/libjava/java/awt/font/TextAttribute.java
@@ -0,0 +1,121 @@
+/* TextAttribute.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.text.AttributedCharacterIterator;
+
+public final class TextAttribute extends AttributedCharacterIterator.Attribute
+{
+ private static final long serialVersionUID = 7744112784117861702L;
+
+ public static final TextAttribute BACKGROUND =
+ new TextAttribute ("BACKGROUND");
+ public static final TextAttribute BIDI_EMBEDDING =
+ new TextAttribute ("BIDI_EMBEDDING");
+ public static final TextAttribute CHAR_REPLACEMENT =
+ new TextAttribute ("CHAR_REPLACEMENT");
+ public static final TextAttribute FAMILY = new TextAttribute ("FAMILY");
+ public static final TextAttribute FONT = new TextAttribute ("FONT");
+ public static final TextAttribute FOREGROUND =
+ new TextAttribute ("FOREGROUND");
+ public static final TextAttribute INPUT_METHOD_HIGHLIGHT =
+ new TextAttribute ("INPUT_METHOD_HIGHLIGHT");
+ public static final TextAttribute INPUT_METHOD_UNDERLINE =
+ new TextAttribute ("INPUT_METHOD_UNDERLINE");
+ public static final TextAttribute JUSTIFICATION =
+ new TextAttribute ("JUSTIFICATION");
+ public static final Float JUSTIFICATION_FULL = new Float (1.0);
+ public static final Float JUSTIFICATION_NONE = new Float (0.0);
+ public static final TextAttribute NUMERIC_SHAPING =
+ new TextAttribute ("NUMERIC_SHAPING");
+ public static final TextAttribute POSTURE = new TextAttribute ("POSTURE");
+ public static final Float POSTURE_OBLIQUE = new Float (0.2);
+ public static final Float POSTURE_REGULAR = new Float (0.0);
+ public static final TextAttribute RUN_DIRECTION =
+ new TextAttribute ("RUN_DIRECTION");
+ public static final Boolean RUN_DIRECTION_LTR = new Boolean (true);
+ public static final Boolean RUN_DIRECTION_RTL = new Boolean (false);
+ public static final TextAttribute SIZE = new TextAttribute ("SIZE");
+ public static final TextAttribute STRIKETHROUGH =
+ new TextAttribute ("STRIKETHROUGH");
+ public static final Boolean STRIKETHROUGH_ON = new Boolean (true);
+ public static final TextAttribute SUPERSCRIPT =
+ new TextAttribute ("SUPERSCRIPT");
+ public static final Integer SUPERSCRIPT_SUB = new Integer (-1);
+ public static final Integer SUPERSCRIPT_SUPER = new Integer (1);
+ public static final TextAttribute SWAP_COLORS =
+ new TextAttribute ("SWAP_COLORS");
+ public static final Boolean SWAP_COLORS_ON = new Boolean (true);
+ public static final TextAttribute TRANSFORM = new TextAttribute ("TRANSFORM");
+ public static final TextAttribute UNDERLINE = new TextAttribute ("UNDERLINE");
+ public static final Integer UNDERLINE_LOW_DASHED = new Integer (0);
+ public static final Integer UNDERLINE_LOW_DOTTED = new Integer (0);
+ public static final Integer UNDERLINE_LOW_GRAY = new Integer (0);
+ public static final Integer UNDERLINE_LOW_ONE_PIXEL = new Integer (0);
+ public static final Integer UNDERLINE_LOW_TWO_PIXEL = new Integer (0);
+ public static final Integer UNDERLINE_ON = new Integer (0);
+ public static final TextAttribute WEIGHT = new TextAttribute ("WEIGHT");
+ public static final Float WEIGHT_BOLD = new Float (2.0);
+ public static final Float WEIGHT_DEMIBOLD = new Float (1.75);
+ public static final Float WEIGHT_DEMILIGHT = new Float (0.875);
+ public static final Float WEIGHT_EXTRA_LIGHT = new Float (0.5);
+ public static final Float WEIGHT_EXTRABOLD = new Float (2.5);
+ public static final Float WEIGHT_HEAVY = new Float (2.25);
+ public static final Float WEIGHT_LIGHT = new Float (0.75);
+ public static final Float WEIGHT_MEDIUM = new Float (1.5);
+ public static final Float WEIGHT_REGULAR = new Float (1.0);
+ public static final Float WEIGHT_SEMIBOLD = new Float (1.25);
+ public static final Float WEIGHT_ULTRABOLD = new Float (2.75);
+ public static final TextAttribute WIDTH = new TextAttribute ("");
+ public static final Float WIDTH_CONDENSED = new Float (0.75);
+ public static final Float WIDTH_EXTENDED = new Float (1.5);
+ public static final Float WIDTH_REGULAR = new Float (1.0);
+ public static final Float WIDTH_SEMI_CONDENSED = new Float (0.875);
+ public static final Float WIDTH_SEMI_EXTENDED = new Float (1.25);
+
+ protected TextAttribute (String name)
+ {
+ super (name);
+ }
+
+ protected Object readResolve ()
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/TextLayout.java b/libjava/java/awt/font/TextLayout.java
new file mode 100644
index 0000000..60c4966
--- /dev/null
+++ b/libjava/java/awt/font/TextLayout.java
@@ -0,0 +1,321 @@
+/* TextLayout.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.text.AttributedCharacterIterator;
+import java.util.Map;
+
+/**
+ * @author Michael Koch
+ */
+public final class TextLayout implements Cloneable
+{
+ public static final CaretPolicy DEFAULT_CARET_POLICY = new CaretPolicy ();
+
+ public static class CaretPolicy
+ {
+ public CaretPolicy ()
+ {
+ // Do nothing here.
+ }
+
+ public TextHitInfo getStrongCaret (TextHitInfo hit1, TextHitInfo hit2,
+ TextLayout layout)
+ {
+ throw new Error ("not implemented");
+ }
+ }
+
+ private FontRenderContext fontRenderContext;
+
+ public TextLayout (AttributedCharacterIterator text, FontRenderContext frc)
+ {
+ // FIXME
+ this.fontRenderContext = frc;
+ }
+
+ public TextLayout (String string, Font font, FontRenderContext frc)
+ {
+ // FIXME
+ this.fontRenderContext = frc;
+ }
+
+ public TextLayout (String string, Map attributes, FontRenderContext frc)
+ {
+ // FIXME
+ this.fontRenderContext = frc;
+ }
+
+ protected Object clone ()
+ {
+ try
+ {
+ return super.clone ();
+ }
+ catch (CloneNotSupportedException e)
+ {
+ // This should never occur
+ throw new InternalError ();
+ }
+ }
+
+ public void draw (Graphics2D g2, float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean equals (Object obj)
+ {
+ if (! (obj instanceof TextLayout))
+ return false;
+
+ return equals ((TextLayout) obj);
+ }
+
+ public boolean equals (TextLayout tl)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAdvance ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAscent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public byte getBaseline ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float[] getBaselineOffsets ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getBlackBoxBounds (int firstEndpoint, int secondEndpoint)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Rectangle2D getBounds()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float[] getCaretInfo (TextHitInfo hit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float[] getCaretInfo (TextHitInfo hit, Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getCaretShape (TextHitInfo hit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getCaretShape (TextHitInfo hit, Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape[] getCaretShapes (int offset)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape[] getCaretShapes (int offset, Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape[] getCaretShapes (int offset, Rectangle2D bounds,
+ TextLayout.CaretPolicy policy)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int getCharacterCount ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public byte getCharacterLevel (int index)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getDescent ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextLayout getJustifiedLayout (float justificationWidth)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getLeading ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint,
+ Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int[] getLogicalRangesForVisualSelection (TextHitInfo firstEndpoint,
+ TextHitInfo secondEndpoint)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextLeftHit (int offset)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextLeftHit (int offset, TextLayout.CaretPolicy policy)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextLeftHit (TextHitInfo hit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextRightHit (int offset)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextRightHit (int offset, TextLayout.CaretPolicy policy)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getNextRightHit (TextHitInfo hit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getOutline (AffineTransform tx)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getVisibleAdvance ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
+ TextHitInfo secondEndpoint)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
+ TextHitInfo secondEndpoint,
+ Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo getVisualOtherHit (TextHitInfo hit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ protected void handleJustify (float justificationWidth)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int hashCode ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo hitTestChar (float x, float y)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextHitInfo hitTestChar (float x, float y, Rectangle2D bounds)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean isLeftToRight ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public boolean isVertical ()
+ {
+ throw new Error ("not implemented");
+ }
+
+ public String toString ()
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/TextMeasurer.java b/libjava/java/awt/font/TextMeasurer.java
new file mode 100644
index 0000000..2aa5a07
--- /dev/null
+++ b/libjava/java/awt/font/TextMeasurer.java
@@ -0,0 +1,97 @@
+/* TextMeasurer.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.text.AttributedCharacterIterator;
+
+/**
+ * @author Michael Koch
+ * @since 1.3
+ */
+public final class TextMeasurer implements Cloneable
+{
+ private AttributedCharacterIterator ci;
+ private FontRenderContext frc;
+
+ public TextMeasurer (AttributedCharacterIterator text, FontRenderContext frc)
+ {
+ this.ci = text;
+ this.frc = frc;
+ }
+
+ protected Object clone ()
+ {
+ try
+ {
+ return super.clone ();
+ }
+ catch (CloneNotSupportedException e)
+ {
+ // This may never occur
+ throw new InternalError ();
+ }
+ }
+
+ public void deleteChar (AttributedCharacterIterator newParagraph,
+ int deletePos)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public float getAdvanceBetween (int start, int limit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public TextLayout getLayout (int start, int limit)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public int getLineBreakIndex (int start, float maxAdvance)
+ {
+ throw new Error ("not implemented");
+ }
+
+ public void insertChar (AttributedCharacterIterator newParagraph,
+ int insertPos)
+ {
+ throw new Error ("not implemented");
+ }
+}
diff --git a/libjava/java/awt/font/TransformAttribute.java b/libjava/java/awt/font/TransformAttribute.java
new file mode 100644
index 0000000..b241704
--- /dev/null
+++ b/libjava/java/awt/font/TransformAttribute.java
@@ -0,0 +1,73 @@
+/* TransformAttribute.java
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.font;
+
+import java.awt.geom.AffineTransform;
+import java.io.Serializable;
+
+/**
+ * @author Michael Koch
+ */
+public final class TransformAttribute implements Serializable
+{
+ private static final long serialVersionUID = 3356247357827709530L;
+
+ private AffineTransform affineTransform;
+
+ public TransformAttribute (AffineTransform transform)
+ {
+ if (transform != null)
+ {
+ this.affineTransform = new AffineTransform (transform);
+ }
+ }
+
+ public AffineTransform getTransform ()
+ {
+ return affineTransform;
+ }
+
+ /**
+ * @since 1.4
+ */
+ public boolean isIdentity ()
+ {
+ return (affineTransform == null ? false : affineTransform.isIdentity ());
+ }
+}