public class DrawFontManagerDefault extends Object implements DrawFontManager
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
knownSymbolFonts |
| Constructor and Description |
|---|
DrawFontManagerDefault() |
| Modifier and Type | Method and Description |
|---|---|
Font |
createAWTFont(Graphics2D graphics,
FontInfo fontInfo,
double fontSize,
boolean bold,
boolean italic)
Create an AWT font object with the given attributes
|
FontInfo |
getFallbackFont(Graphics2D graphics,
FontInfo fontInfo)
In case the original font doesn't contain a glyph, use the
returned fallback font as an alternative
|
FontInfo |
getMappedFont(Graphics2D graphics,
FontInfo fontInfo)
select a font to be used to paint text
|
String |
mapFontCharset(Graphics2D graphics,
FontInfo fontInfo,
String text)
Symbol fonts like "Wingdings" or "Symbol" have glyphs mapped to a Unicode private use range via the Java font loader,
although a system font viewer might show you the glyphs in the ASCII range.
|
public FontInfo getMappedFont(Graphics2D graphics, FontInfo fontInfo)
DrawFontManagergetMappedFont in interface DrawFontManagergraphics - the graphics context to request additional rendering hintsfontInfo - the font info object corresponding to the text run fontpublic FontInfo getFallbackFont(Graphics2D graphics, FontInfo fontInfo)
DrawFontManagergetFallbackFont in interface DrawFontManagergraphics - the graphics context to request additional rendering hintsfontInfo - the font info object corresponding to the text run fontpublic String mapFontCharset(Graphics2D graphics, FontInfo fontInfo, String text)
mapFontCharset in interface DrawFontManagergraphics - the used graphics contextfontInfo - the font infotext - the input stringStringUtil.mapMsCodepointString(String)public Font createAWTFont(Graphics2D graphics, FontInfo fontInfo, double fontSize, boolean bold, boolean italic)
DrawFontManagercreateAWTFont in interface DrawFontManagergraphics - the graphics context to request additional rendering hintsfontInfo - the font info object corresponding to the text run fontfontSize - the font size in pointsbold - true if the font is bolditalic - true if the font is italic