public class AWTFontResolver extends Object implements FontResolver
| Constructor and Description |
|---|
AWTFontResolver()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected static Font |
createFont(SharedContext ctx,
Font rootFont,
float size,
IdentValue weight,
IdentValue style,
IdentValue variant)
Creates a concrete instance of a font at specified size, weight, style and variant.
|
void |
flushCache() |
protected static String |
getFontInstanceHashName(SharedContext ctx,
String name,
float size,
IdentValue weight,
IdentValue style,
IdentValue variant)
Gets the hash key for a concrete instance of a font.
|
FSFont |
resolveFont(SharedContext renderingContext,
FontSpecification spec) |
FSFont |
resolveFont(SharedContext ctx,
String[] families,
float size,
IdentValue weight,
IdentValue style,
IdentValue variant)
Resolves a list of font families.
|
protected Font |
resolveFont(SharedContext ctx,
String font,
float size,
IdentValue weight,
IdentValue style,
IdentValue variant)
Resolves a single font name.
|
void |
setFontMapping(String name,
Font font)
Sets the fontMapping attribute of the FontResolver object
|
public void flushCache()
flushCache in interface FontResolverpublic FSFont resolveFont(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)
public void setFontMapping(String name, Font font)
name - The new fontMapping valuefont - The new fontMapping valueprotected static Font createFont(SharedContext ctx, Font rootFont, float size, IdentValue weight, IdentValue style, IdentValue variant)
protected Font resolveFont(SharedContext ctx, String font, float size, IdentValue weight, IdentValue style, IdentValue variant)
protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant)
public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec)
resolveFont in interface FontResolverCopyright © 2018. All rights reserved.