public class StandardFontMapper extends Object implements FontMapper
FontMapper interface. This implementation will map the
Java logical fonts to equivalent SVG generic fonts. You can add your own mappings if you need to.| Constructor and Description |
|---|
StandardFontMapper()Creates a new instance with mappings for the Java logical fonts. |
| Modifier and Type | Method and Description |
|---|---|
String | get(String family)Returns the mapped (alternate) font family name. |
String | mapFont(String family)Maps the specified font family name to an alternative, or else returns the same family name. |
void | put(String family,
String alternate)Adds a font family mapping (if the specified alternate is null it has the effect of
clearing any existing mapping). |
public StandardFontMapper()
public String get(String family)
family - the font family (null not permitted).null).public String mapFont(String family)
mapFont in interface FontMapperfamily - the font family name (null not permitted).null).