final class FileSystemFontProvider extends FontProvider
Modifier and Type | Class and Description |
---|---|
private static class |
FileSystemFontProvider.FSFontInfo |
private static class |
FileSystemFontProvider.FSIgnored
Represents ignored fonts (i.e.
|
Modifier and Type | Field and Description |
---|---|
private FontCache |
cache |
private java.util.List<FileSystemFontProvider.FSFontInfo> |
fontInfoList |
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
FileSystemFontProvider(FontCache cache)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
addTrueTypeCollection(java.io.File ttcFile)
Adds a TTC or OTC to the file cache.
|
private void |
addTrueTypeFont(java.io.File ttfFile)
Adds an OTF or TTF font to the file cache.
|
private void |
addTrueTypeFontImpl(TrueTypeFont ttf,
java.io.File file)
Adds an OTF or TTF font to the file cache.
|
private void |
addType1Font(java.io.File pfbFile)
Adds a Type 1 font to the file cache.
|
private java.io.File |
getDiskCacheFile() |
java.util.List<? extends FontInfo> |
getFontInfo()
Returns a list of information about fonts on the system.
|
private java.util.List<FileSystemFontProvider.FSFontInfo> |
loadDiskCache(java.util.List<java.io.File> files)
Loads the font metadata cache from disk.
|
private void |
saveDiskCache()
Saves the font metadata cache to disk.
|
private void |
scanFonts(java.util.List<java.io.File> files) |
java.lang.String |
toDebugString()
Returns a string containing debugging information.
|
private static final org.apache.commons.logging.Log LOG
private final java.util.List<FileSystemFontProvider.FSFontInfo> fontInfoList
private final FontCache cache
FileSystemFontProvider(FontCache cache)
private void scanFonts(java.util.List<java.io.File> files)
private java.io.File getDiskCacheFile()
private void saveDiskCache()
private java.util.List<FileSystemFontProvider.FSFontInfo> loadDiskCache(java.util.List<java.io.File> files)
private void addTrueTypeCollection(java.io.File ttcFile) throws java.io.IOException
java.io.IOException
private void addTrueTypeFont(java.io.File ttfFile) throws java.io.IOException
java.io.IOException
private void addTrueTypeFontImpl(TrueTypeFont ttf, java.io.File file) throws java.io.IOException
java.io.IOException
private void addType1Font(java.io.File pfbFile) throws java.io.IOException
java.io.IOException
public java.lang.String toDebugString()
FontProvider
toDebugString
in class FontProvider
public java.util.List<? extends FontInfo> getFontInfo()
FontProvider
getFontInfo
in class FontProvider