Home » openjdk-7 » sun » font » [javadoc | source]
public interface: FontManager [javadoc | source]

All Known Implementing Classes:
    X11FontManager, FontManagerForSGE, SunFontManager, Win32FontManager

Interface between Java Fonts (java.awt.Font) and the underlying font files/native font resources and the Java and native font scalers.
Field Summary
public static final  int NO_FALLBACK     
public static final  int PHYSICAL_FALLBACK     
public static final  int LOGICAL_FALLBACK     
Method from sun.font.FontManager Summary:
createFont2D,   deRegisterBadFont,   findFont2D,   getNewComposite,   preferLocaleFonts,   preferProportionalFonts,   registerFont,   usingPerAppContextComposites
Method from sun.font.FontManager Detail:
 public Font2D createFont2D(File fontFile,
    int fontFormat,
    boolean isCopy,
    CreatedFontTracker tracker) throws FontFormatException
    Creates a Font2D for the specified font file, that is expected to be in the specified font format (according to the constants in java.awt.Font). The parameter {@code isCopy} is set to true when the specified font file is actually a copy of the font data and needs to be deleted afterwards. This method is called for the Font.createFont() methods.
 public  void deRegisterBadFont(Font2D font2D)
 public Font2D findFont2D(String name,
    int style,
    int fallback)
    The client supplies a name and a style. The name could be a family name, or a full name. A font may exist with the specified style, or it may exist only in some other style. For non-native fonts the scaler may be able to emulate the required style.
 public Font2DHandle getNewComposite(String family,
    int style,
    Font2DHandle handle)
    Creates a derived composite font from the specified font (handle).
 public  void preferLocaleFonts()
    Indicates a preference for locale-specific fonts in the mapping of logical fonts to physical fonts. Calling this method indicates that font rendering should primarily use fonts specific to the primary writing system (the one indicated by the default encoding and the initial default locale). For example, if the primary writing system is Japanese, then characters should be rendered using a Japanese font if possible, and other fonts should only be used for characters for which the Japanese font doesn't have glyphs.

    The actual change in font rendering behavior resulting from a call to this method is implementation dependent; it may have no effect at all, or the requested behavior may already match the default behavior. The behavior may differ between font rendering in lightweight and peered components. Since calling this method requests a different font, clients should expect different metrics, and may need to recalculate window sizes and layout. Therefore this method should be called before user interface initialisation.

 public  void preferProportionalFonts()
    preferLocaleFonts() and preferProportionalFonts() are called to inform that the application could be using an alternate set of composite fonts, and so the implementation should try to create a CompositeFonts with this directive in mind.
 public boolean registerFont(Font font)
    Register a new font. Please, note that {@code null} is not a valid argument, and it's caller's responsibility to ensure that, but to keep compatibility, if {@code null} is passed as an argument, {@code false} is returned, and no NullPointerException is thrown. As additional note, an implementation should ensure that this font cannot override existing installed fonts.
 public boolean usingPerAppContextComposites()
    If usingPerAppContextComposites is true, we are in "applet" (eg browser) enviroment and at least one context has selected an alternate composite font behaviour.