Class awt.FontTable
All Packages    This Package    Previous    Next

Class awt.FontTable

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

public class FontTable
extends Object
A class that creates font objects. Fonts are addressed by names in the FontTable. These names may not be the actual name of the font. By default, the names "Helvetica", "TimesRoman", "ZapfDingbats", "Dialog", "DialogInput", and "Courier" are always available. "Dialog" is bound to a native font that is appropriate for dialog components such as buttons or menus. In each font category, the sizes 8, 10, 12, 14, 24, 36 are always available. Other sizes may be specified and will work if the requested font is bound to a scalable font on the local platform or if the platform can do font-scaling. If scaling is not available, then the closest match is returned.
Version:
1.11 10 Apr 1995
Author:
Sami Shaio

FontTable()

compoundName(String, int, int)
Returns a string representation of a font-name, style and height.
getFont(String, int, int)
Return a platform-specific font given a generic name.
getFont(String)
Return a platform-specific font given a name of the form :style:size where style can be "plain", "bold", "italic" or "bolditalic".
getNativeFont(int)
Return the name of the native font with the given index.
getNativeFontCount()
List the number of fonts on the native platform.
parseCompoundName(String)

FontTable
  public FontTable()

getFont
  public Font getFont(String name,
                      int style,
                      int height)
Return a platform-specific font given a generic name. See Font class for the appropriate values for style.

getFont

  public Font getFont(String compoundName)
Return a platform-specific font given a name of the form :style:size where style can be "plain", "bold", "italic" or "bolditalic".

getNativeFontCount

  public int getNativeFontCount()
List the number of fonts on the native platform.

getNativeFont

  public String getNativeFont(int index)
Return the name of the native font with the given index.

compoundName

  public String compoundName(String name,
                             int style,
                             int height)
Returns a string representation of a font-name, style and height.

parseCompoundName

  public static FontSpec parseCompoundName(String cname)

All Packages    This Package    Previous    Next