org.pentaho.reporting.libraries.fonts.registry
public abstract class AbstractFontFileRegistry extends java.lang.Object implements FontRegistry
Modifier | Constructor and Description |
---|---|
protected |
AbstractFontFileRegistry() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
addFont(java.io.File font,
java.lang.String encoding)
Adds the fontname by creating the basefont object.
|
protected java.io.File |
createStorageLocation() |
protected java.lang.String |
getDefaultEncoding() |
protected abstract java.io.FileFilter |
getFileFilter() |
protected java.util.HashMap |
getSeenFiles() |
void |
initialize() |
protected boolean |
isCached(java.io.File file) |
protected boolean |
isCacheValid(java.util.HashMap cachedSeenFiles) |
protected void |
loadFromCache(java.lang.String encoding) |
void |
registerDefaultFontPath()
Register os-specific font paths to the PDF-FontFactory.
|
void |
registerFontFile(java.io.File file,
java.lang.String encoding) |
void |
registerFontFile(java.lang.String filename,
java.lang.String encoding)
Register the font (must end this *.ttf) to the FontFactory.
|
void |
registerFontPath(java.io.File file,
java.lang.String encoding)
Register all fonts (*.ttf files) in the given path.
|
protected java.lang.String |
safeSystemGetProperty(java.lang.String name,
java.lang.String defaultValue) |
protected void |
storeToCache(java.lang.String encoding) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createMetricsFactory, getAllRegisteredFamilies, getFontFamily, getRegisteredFamilies, getSecondLevelCache
protected java.util.HashMap getSeenFiles()
protected abstract java.io.FileFilter getFileFilter()
public void initialize()
initialize
in interface FontRegistry
protected java.lang.String getDefaultEncoding()
public void registerDefaultFontPath()
protected void storeToCache(java.lang.String encoding)
protected void loadFromCache(java.lang.String encoding)
public void registerFontPath(java.io.File file, java.lang.String encoding)
file
- the directory that contains the font files.encoding
- the encoding for the given font.protected boolean isCached(java.io.File file)
public void registerFontFile(java.lang.String filename, java.lang.String encoding)
filename
- the filename.encoding
- the encoding.public void registerFontFile(java.io.File file, java.lang.String encoding)
protected abstract boolean addFont(java.io.File font, java.lang.String encoding) throws java.io.IOException
font
- the font file name.encoding
- the encoding.java.io.IOException
- if the base font file could not be read.protected java.lang.String safeSystemGetProperty(java.lang.String name, java.lang.String defaultValue)
protected boolean isCacheValid(java.util.HashMap cachedSeenFiles)
protected java.io.File createStorageLocation()