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. Since the pData field could point to an arbitrary amount of information needed by the AWT library, FontTable should be used to create new fonts to guarantee sharing of information.
See Also:
FontTable, getFontMetrics, getFontMetrics
Version:
1.23 16 May 1995
Author:
Sami Shaio

BOLD
ITALIC
PLAIN
UNDERLINE
actualHeight
The actual logical height of this font after possible size substitutions occur in the awt library when looking for a font match.
ascent
The logical ascent for this font, not guaranteed to be initialized until the first time the metrics for this font are fetched and not guaranteed to be applicable to all output devices.
descent
The logical descent for this font, not guaranteed to be initialized until the first time the metrics for this font are fetched and not guaranteed to be applicable to all output devices.
family
The family name of this font.
height
The old field name for the point size of this font.
size
The point size of this font.
style
The style of the font.
widths
This field is deprecated.

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.
finalize()
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
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, or UNDERLINE.
size
  public int size
The point size of this font.
ascent
  public int ascent
The logical ascent for this font, not guaranteed to be initialized until the first time the metrics for this font are fetched and not guaranteed to be applicable to all output devices. This field is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics
descent
  public int descent
The logical descent for this font, not guaranteed to be initialized until the first time the metrics for this font are fetched and not guaranteed to be applicable to all output devices. This field is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics
height
  public int height
The old field name for the point size of this font. This field was renamed to "size" to avoid confusion with the font metric of the same name which provides information about how tall the font actually is. This field is deprecated. Use size to refer to the requested size of the font and use getFontMetrics to obtain information about the font for layout purposes.
See Also:
getFontMetrics, getFontMetrics
actualHeight
  public int actualHeight
The actual logical height of this font after possible size substitutions occur in the awt library when looking for a font match. This field is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics
widths
  public int widths[]
This field is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics

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. This function is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics

stringWidth

  public int stringWidth(String s)
Return the width of the specified string in this Font. This function is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics

charsWidth

  public int charsWidth(char data[],
                        int off,
                        int len)
Return the width of the specified char[] in this Font. This function is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics

bytesWidth

  public int bytesWidth(byte data[],
                        int off,
                        int len)
Return the width of the specified byte[] in this Font. This function is deprecated. Use getFontMetrics instead.
See Also:
getFontMetrics, getFontMetrics

dispose

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

finalize

  public void finalize()

All Packages    This Package    Previous    Next