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
(创建具有给定属性的 AWT 字体对象)
|
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 hints
(graphics - 请求额外渲染提示的图形上下文)
fontInfo
- the font info object corresponding to the text run font
(fontInfo - 文本运行字体对应的字体信息对象)
FontInfo getFallbackFont(java.awt.Graphics2D graphics, FontInfo fontInfo)
graphics
- the graphics context to request additional rendering hints
(graphics - 请求额外渲染提示的图形上下文)
fontInfo
- the font info object corresponding to the text run font
(fontInfo - 文本运行字体对应的字体信息对象)
java.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 hints
(graphics - 请求额外渲染提示的图形上下文)
fontInfo
- the font info object corresponding to the text run font
(fontInfo - 文本运行字体对应的字体信息对象)
text
- the raw text
(text - 原始文本)
StringUtil.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 hints
(graphics - 请求额外渲染提示的图形上下文)
fontInfo
- the font info object corresponding to the text run font
(fontInfo - 文本运行字体对应的字体信息对象)
size
- the font size in points
(size - 以磅为单位的字体大小)
bold
-
true
if the font is bold
(粗体 - 如果字体为粗体则为真)
italic
-
true
if the font is italic
(italic - 如果字体是斜体则为真)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.