Package org.apache.batik.bridge
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final List
protected static final List
protected static final Map
List of all available fonts on the current system, plus a few common alternatives.protected static final Map
This keeps track of all the resolved font families.static final DefaultFontFamilyResolver
-
Method Summary
Modifier and TypeMethodDescriptiongetFamilyThatCanDisplay
(char c) loadFont
(InputStream in, FontFace ff) Resolves a font family name into a GVTFontFamily.
-
Field Details
-
SINGLETON
-
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.
-
-
Method Details
-
resolve
- Specified by:
resolve
in interfaceFontFamilyResolver
-
loadFont
- Specified by:
loadFont
in 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:
resolve
in 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:
getFamilyThatCanDisplay
in interfaceFontFamilyResolver
-
getDefault
- Specified by:
getDefault
in interfaceFontFamilyResolver
-