| Modifier and Type | Field and Description |
|---|---|
| private final Map | availableFontsHash
Map of base fonts, from which we can derive a concrete instance at the correct size, weight, etc. Note The value is initially null until we need the given base font. |
| private final Map | instanceHash
Map of concrete instances of fonts including size, weight, etc. |
| Access | Constructor and Description |
|---|---|
| public |
| 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. |
| public void | |
| 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. |
| private void | |
| public 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. |
| public FSFont | resolveFont(SharedContext renderingContext, FontSpecification spec)
Implements com.
|
| public void | setFontMapping(String
The new fontMapping value name, Font The new fontMapping value font)Sets the fontMapping attribute of the FontResolver object |
| availableFontsHash | back to summary |
|---|---|
| private final Map<String, Font> availableFontsHash Map of base fonts, from which we can derive a concrete instance at the correct size, weight, etc. Note The value is initially null until we need the given base font. | |
| instanceHash | back to summary |
|---|---|
| private final Map<String, Font> instanceHash Map of concrete instances of fonts including size, weight, etc. | |
| AWTFontResolver | back to summary |
|---|---|
| public AWTFontResolver() Constructor | |
| createFont | back to summary |
|---|---|
| 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. | |
| flushCache | back to summary |
|---|---|
| public void flushCache() | |
| getFontInstanceHashName | back to summary |
|---|---|
| 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. This incorporates size, weight, etc. | |
| init | back to summary |
|---|---|
| private void init() | |
| resolveFont | back to summary |
|---|---|
| public FSFont resolveFont(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant) Resolves a list of font families. | |
| resolveFont | back to summary |
|---|---|
| protected Font resolveFont(SharedContext ctx, String font, float size, IdentValue weight, IdentValue style, IdentValue variant) Resolves a single font name. Todo Make case insensitive. | |
| resolveFont | back to summary |
|---|---|
| public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec) Implements com. | |
| setFontMapping | back to summary |
|---|---|
| public void setFontMapping(String name, Font font) Sets the fontMapping attribute of the FontResolver object | |