public interface DrawFontManager
Modifier and Type | Method and Description |
---|---|
java.awt.Font |
createAWTFont(java.awt.Graphics2D graphics,
FontInfo fontInfo,
double size,
boolean bold,
boolean italic)
Create an AWT font object with the given attributes
|
FontInfo |
getFallbackFont(java.awt.Graphics2D graphics,
FontInfo fontInfo)
In case the original font doesn't contain a glyph, use the
returned fallback font as an alternative
|
FontInfo |
getMappedFont(java.awt.Graphics2D graphics,
FontInfo fontInfo)
select a font to be used to paint text
|
java.lang.String |
mapFontCharset(java.awt.Graphics2D graphics,
FontInfo fontInfo,
java.lang.String text)
Map text charset depending on font family.
|
FontInfo getMappedFont(java.awt.Graphics2D graphics, FontInfo fontInfo)
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run fontFontInfo getFallbackFont(java.awt.Graphics2D graphics, FontInfo fontInfo)
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run fontjava.lang.String mapFontCharset(java.awt.Graphics2D graphics, FontInfo fontInfo, java.lang.String text)
Currently this only maps for wingdings and symbol font (into unicode private use area)
Depending if the requested font is installed in the system, tbe mapped string varies:
If the font is registered into the graphics environment the characters are mapped to the
private use area. If the font is missing (and hence a AWT logical font is used), the
characters are mapped to the corresponding unicode characters
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run fonttext
- the raw textStringUtil.mapMsCodepointString(String)
java.awt.Font createAWTFont(java.awt.Graphics2D graphics, FontInfo fontInfo, double size, boolean bold, boolean italic)
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run fontsize
- the font size in pointsbold
- true
if the font is bolditalic
- true
if the font is italicCopyright 2021 The Apache Software Foundation or its licensors, as applicable.