Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.gvt.font
Class FontFamilyResolver

    java.lang.Object
      org.apache.batik.gvt.font.FontFamilyResolver

public class FontFamilyResolver
extends java.lang.Object

The is a utility class that is used for resolving UnresolvedFontFamilies.

Field Summary
`protected static java.util.Vector` | `awtFontFamilies`
`protected static java.util.Vector` | `awtFonts`
`static AWTFontFamily` | `defaultFont` The default font.
`protected static java.util.Map` | `fonts` List of all available fonts on the current system, plus a few common alternatives.
`protected static java.util.Map` | `resolvedFontFamilies` This keeps track of all the resolved font families.

Constructor Summary
`FontFamilyResolver()`

Method Summary
`static GVTFontFamily` | `getFamilyThatCanDisplay(char c)`
`static java.lang.String` | `lookup(java.lang.String familyName)` Looks up a font family name and returns the platform name for the font.
`static GVTFontFamily` | `resolve(java.lang.String familyName)` Resolves a font family name into a GVTFontFamily.
`static GVTFontFamily` | `resolve(UnresolvedFontFamily fontFamily)` Resolves an UnresolvedFontFamily into a GVTFontFamily.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### defaultFont

    public static final AWTFontFamily defaultFont

  The default font. This will be used when no font families can be resolved for a particular text chunck/run.

### fonts

    protected static final java.util.Map fonts

  List of all available fonts on the current system, plus a few common alternatives.

### awtFontFamilies

    protected static final java.util.Vector awtFontFamilies

### awtFonts

    protected static final java.util.Vector awtFonts

### resolvedFontFamilies

    protected static java.util.Map resolvedFontFamilies

  This keeps track of all the resolved font families. This is to hopefully reduce the number of font family objects used.

Constructor Detail

### FontFamilyResolver

    public FontFamilyResolver()

Method Detail

### lookup

    public static java.lang.String lookup(java.lang.String familyName)

  Looks up a font family name and returns the platform name for the font.

  Parameters:
    `familyName` - The Font Family name to resolve
  Returns:
    The platform name for the font or null if it can't be found.

### resolve

    public static GVTFontFamily resolve(java.lang.String familyName)

  Resolves a font family name into a GVTFontFamily. If the font family cannot be resolved then null will be returned.

  Parameters:
    `familyName` - The Font Family name to resolve
  Returns:
    A resolved GVTFontFamily or null if the font family could not be resolved.

### resolve

    public static GVTFontFamily resolve(UnresolvedFontFamily fontFamily)

  Resolves an UnresolvedFontFamily into a GVTFontFamily. If the font family cannot be resolved then null will be returned.

  Parameters:
    `fontFamily` - The UnresolvedFontFamily to resolve
  Returns:
    A resolved GVTFontFamily or null if the font family could not be resolved.

### getFamilyThatCanDisplay

    public static GVTFontFamily getFamilyThatCanDisplay(char c)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache Software Foundation. All Rights Reserved.