Class awt.Font
All Packages    This Package    Previous    Next

Class awt.Font

java.lang.Object
   |
   +----awt.Font

public class Font
extends Object
A font object. Use FontTable to create new fonts.
See Also:
FontTable
Version:
1.19 23 Feb 1995
Author:
Sami Shaio

BOLD
ITALIC
PLAIN
UNDERLINE
actualHeight
The actual height of the font.
ascent
descent
family
The family name of this font.
height
style
The style of the font.
widths

bytesWidth(byte[], int, int)
Return the width of the specified byte[] in this Font.
charWidth(int)
Return the width of the specified character in this Font.
charsWidth(char[], int, int)
Return the width of the specified char[] in this Font.
dispose()
Dispose of this font.
stringWidth(String)
Return the width of the specified string in this Font.
toString()
Convert this object to a string representation.

PLAIN
  public final static int PLAIN
BOLD
  public final static int BOLD
ITALIC
  public final static int ITALIC
UNDERLINE
  public final static int UNDERLINE
widths
  public int widths[]
ascent
  public int ascent
descent
  public int descent
height
  public int height
actualHeight
  public int actualHeight
The actual height of the font. It may be different than the height field because of font substitutions.
family
  public String family
The family name of this font.
style
  public int style
The style of the font. This is the sum of the constants PLAIN, BOLD, ITALIC, and UNDERLINE.

toString
  public String toString()
Convert this object to a string representation.
Overrides:
toString in class Object

charWidth

  public int charWidth(int ch)
Return the width of the specified character in this Font.

stringWidth

  public int stringWidth(String s)
Return the width of the specified string in this Font.

charsWidth

  public int charsWidth(char data[],
                        int off,
                        int len)
Return the width of the specified char[] in this Font.

bytesWidth

  public int bytesWidth(byte data[],
                        int off,
                        int len)
Return the width of the specified byte[] in this Font.

dispose

  public void dispose()
Dispose of this font. The use of the font after calling dispose is undefined.


All Packages    This Package    Previous    Next