Package org.xhtmlrenderer.swing
Class AWTFontResolver
- java.lang.Object
-
- org.xhtmlrenderer.swing.AWTFontResolver
-
- All Implemented Interfaces:
FontResolver
public class AWTFontResolver extends Object implements FontResolver
- Author:
- Joshua Marinacci
-
-
Constructor Summary
Constructors Constructor Description AWTFontResolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static FontcreateFont(SharedContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant)voidflushCache()protected static StringgetFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant)Gets the fontInstanceHashName attribute of the FontResolverTest objectFSFontresolveFont(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)protected FontresolveFont(SharedContext ctx, String font, float size, IdentValue weight, IdentValue style, IdentValue variant)FSFontresolveFont(SharedContext renderingContext, FontSpecification spec)voidsetFontMapping(String name, Font font)Sets the fontMapping attribute of the FontResolver object
-
-
-
Method Detail
-
flushCache
public void flushCache()
- Specified by:
flushCachein interfaceFontResolver
-
resolveFont
public FSFont resolveFont(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
setFontMapping
public void setFontMapping(String name, Font font)
Sets the fontMapping attribute of the FontResolver object- Parameters:
name- The new fontMapping valuefont- The new fontMapping value
-
createFont
protected static Font createFont(SharedContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
resolveFont
protected Font resolveFont(SharedContext ctx, String font, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
getFontInstanceHashName
protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant)
Gets the fontInstanceHashName attribute of the FontResolverTest object
-
resolveFont
public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec)
- Specified by:
resolveFontin interfaceFontResolver
-
-