Class DefaultFontFamilyResolver
java.lang.Object
org.apache.batik.bridge.DefaultFontFamilyResolver
- All Implemented Interfaces:
FontFamilyResolver
The is a utility class that is used for resolving UnresolvedFontFamilies.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Listprotected static final Listprivate static final AWTFontFamilyThe default font.protected static final MapList of all available fonts on the current system, plus a few common alternatives.protected static final MapThis keeps track of all the resolved font families.static final DefaultFontFamilyResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFamilyThatCanDisplay(char c) loadFont(InputStream in, FontFace ff) Resolves a font family name into a GVTFontFamily.
-
Field Details
-
SINGLETON
-
DEFAULT_FONT_FAMILY
The default font. This will be used when no font families can be resolved for a particular text chunk/run. -
fonts
List of all available fonts on the current system, plus a few common alternatives. -
awtFontFamilies
-
awtFonts
-
resolvedFontFamilies
This keeps track of all the resolved font families. This is to hopefully reduce the number of font family objects used.
-
-
Constructor Details
-
DefaultFontFamilyResolver
private DefaultFontFamilyResolver()
-
-
Method Details
-
resolve
- Specified by:
resolvein interfaceFontFamilyResolver
-
loadFont
- Specified by:
loadFontin interfaceFontFamilyResolver- Throws:
Exception
-
resolve
Resolves a font family name into a GVTFontFamily. If the font family cannot be resolved then null will be returned.- Specified by:
resolvein interfaceFontFamilyResolver- Parameters:
familyName- The Font Family name to resolve- Returns:
- A resolved GVTFontFamily or null if the font family could not be resolved.
-
getFamilyThatCanDisplay
- Specified by:
getFamilyThatCanDisplayin interfaceFontFamilyResolver
-
getDefault
- Specified by:
getDefaultin interfaceFontFamilyResolver
-