public final class FontCache
extends java.lang.Object
FontProvider
.
PDFBox is free to purge this cache at will.Modifier and Type | Field and Description |
---|---|
private java.util.Map<FontInfo,java.lang.ref.SoftReference<FontBoxFont>> |
cache |
Constructor and Description |
---|
FontCache() |
Modifier and Type | Method and Description |
---|---|
void |
addFont(FontInfo info,
FontBoxFont font)
Adds the given FontBox font to the cache.
|
FontBoxFont |
getFont(FontInfo info)
Returns the FontBox font associated with the given FontInfo.
|
private final java.util.Map<FontInfo,java.lang.ref.SoftReference<FontBoxFont>> cache
public void addFont(FontInfo info, FontBoxFont font)
public FontBoxFont getFont(FontInfo info)