|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.sl.draw.DrawFontManagerDefault
public class DrawFontManagerDefault
Manages fonts when rendering slides. Use this class to handle unknown / missing fonts or to substitute fonts
Constructor Summary | |
---|---|
DrawFontManagerDefault()
|
Method Summary | |
---|---|
java.awt.Font |
createAWTFont(java.awt.Graphics2D graphics,
FontInfo fontInfo,
double fontSize,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrawFontManagerDefault()
Method Detail |
---|
public FontInfo getMappedFont(java.awt.Graphics2D graphics, FontInfo fontInfo)
DrawFontManager
getMappedFont
in interface DrawFontManager
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run font
public FontInfo getFallbackFont(java.awt.Graphics2D graphics, FontInfo fontInfo)
DrawFontManager
getFallbackFont
in interface DrawFontManager
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run font
public java.lang.String mapFontCharset(java.awt.Graphics2D graphics, FontInfo fontInfo, java.lang.String text)
DrawFontManager
Currently this only maps for wingdings font (into unicode private use area)
mapFontCharset
in interface DrawFontManager
graphics
- the graphics context to request additional rendering hintsfontInfo
- the font info object corresponding to the text run fonttext
- the raw text
StringUtil.mapMsCodepointString(String)
public java.awt.Font createAWTFont(java.awt.Graphics2D graphics, FontInfo fontInfo, double fontSize, boolean bold, boolean italic)
DrawFontManager
createAWTFont
in interface DrawFontManager
graphics
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |