phelps.awt.font

Class NFontAWT

public class NFontAWT extends NFontSimple implements Cloneable

NFont wrapper around java.awt.Font. It does not support widths shaping.

Version: $Revision: 1.6 $ $Date: 2003/12/28 20:27:02 $

Field Summary
static StringFORMAT
Constructor Summary
NFontAWT(Font font)
Method Summary
booleancanDisplay(char ch)
booleancanDisplayEchar(char ech)
NFontAWTderiveFont(float size)
NFontAWTderiveFont(AffineTransform at)
voiddrawEstring(Graphics2D g, String estr, float x, float y, int mode)
Java's built-in fonts assume Unicode, so translate str to Unicode and invoke NFontAWT.
voiddrawString(Graphics2D g, String str, float x, float y, int mode)
doubleecharWidth(char ech)
StringgetFamily()
intgetFlags()
StringgetFormat()
Rectangle2DgetMaxCharBounds()
StringgetName()
intgetNumGlyphs()
chargetSpaceChar()
Rectangle2DgetStringBounds(String str, int beginIndex, int limit)
intgetWeight()

Field Detail

FORMAT

public static final String FORMAT

Constructor Detail

NFontAWT

public NFontAWT(Font font)

Method Detail

canDisplay

public boolean canDisplay(char ch)

canDisplayEchar

public boolean canDisplayEchar(char ech)

deriveFont

public NFontAWT deriveFont(float size)

deriveFont

public NFontAWT deriveFont(AffineTransform at)

drawEstring

public void drawEstring(Graphics2D g, String estr, float x, float y, int mode)
Java's built-in fonts assume Unicode, so translate str to Unicode and invoke NFontAWT.

drawString

public void drawString(Graphics2D g, String str, float x, float y, int mode)

echarWidth

public double echarWidth(char ech)

getFamily

public String getFamily()

getFlags

public int getFlags()

getFormat

public String getFormat()

getMaxCharBounds

public Rectangle2D getMaxCharBounds()

getName

public String getName()

getNumGlyphs

public int getNumGlyphs()

getSpaceChar

public char getSpaceChar()

getStringBounds

public Rectangle2D getStringBounds(String str, int beginIndex, int limit)

getWeight

public int getWeight()