|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.FontManager
public class FontManager
The manager of fonts. The class holds a reference to the font cache and information about font substitution, referenced fonts and similar.
Constructor Summary | |
---|---|
FontManager(InternalResourceResolver resourceResolver,
FontDetector fontDetector,
FontCacheManager fontCacheManager)
Main constructor |
Method Summary | |
---|---|
void |
autoDetectFonts(boolean autoDetectFonts,
FontAdder fontAdder,
boolean strict,
FontEventListener listener,
java.util.List<EmbedFontInfo> fontInfoList)
Detect fonts from the operating system via FOPs autodetect mechanism. |
void |
deleteCache()
Deletes the current FontCache file |
void |
disableFontCache()
Whether or not to cache results of font triplet detection/auto-config |
FontCache |
getFontCache()
Returns the font cache instance used by this font manager. |
protected FontSubstitutions |
getFontSubstitutions()
Returns the font substitution catalog |
FontTriplet.Matcher |
getReferencedFontsMatcher()
Gets the FontTriplet.Matcher that can be used to identify the fonts that shall
be referenced rather than embedded. |
InternalResourceResolver |
getResourceResolver()
|
boolean |
isBase14KerningEnabled()
|
void |
saveCache()
Saves the FontCache as necessary |
void |
setBase14KerningEnabled(boolean value)
Controls whether kerning is activated on base 14 fonts. |
void |
setCacheFile(java.net.URI cacheFileURI)
Sets the font cache file |
void |
setFontSubstitutions(FontSubstitutions substitutions)
Sets the font substitutions |
void |
setReferencedFontsMatcher(FontTriplet.Matcher matcher)
Sets the FontTriplet.Matcher that can be used to identify the fonts that shall
be referenced rather than embedded. |
void |
setResourceResolver(InternalResourceResolver resourceResolver)
Sets the font resource resolver |
void |
setup(FontInfo fontInfo,
FontCollection[] fontCollections)
Sets up the fonts on a given FontInfo object. |
void |
updateReferencedFonts(java.util.List<EmbedFontInfo> fontInfoList)
Updates the referenced font list using the FontManager's referenced fonts matcher ( getReferencedFontsMatcher() ). |
void |
updateReferencedFonts(java.util.List<EmbedFontInfo> fontInfoList,
FontTriplet.Matcher matcher)
Updates the referenced font list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontManager(InternalResourceResolver resourceResolver, FontDetector fontDetector, FontCacheManager fontCacheManager)
resourceResolver
- the URI resolverfontDetector
- the font detectorfontCacheManager
- the font cache managerMethod Detail |
---|
public void setResourceResolver(InternalResourceResolver resourceResolver)
resourceResolver
- resource resolverpublic InternalResourceResolver getResourceResolver()
public boolean isBase14KerningEnabled()
public void setBase14KerningEnabled(boolean value)
value
- true if kerning should be activatedpublic void setFontSubstitutions(FontSubstitutions substitutions)
substitutions
- font substitutionsprotected FontSubstitutions getFontSubstitutions()
public void setCacheFile(java.net.URI cacheFileURI)
cacheFileURI
- the URI of the font cache filepublic void disableFontCache()
public FontCache getFontCache()
public void saveCache() throws FOPException
FOPException
- fop exceptionpublic void deleteCache() throws FOPException
FOPException
- if an error was thrown while deleting the cachepublic void setup(FontInfo fontInfo, FontCollection[] fontCollections)
FontCollection
objects.
fontInfo
- the FontInfo object to set upfontCollections
- the array of font collections/sourcespublic void setReferencedFontsMatcher(FontTriplet.Matcher matcher)
FontTriplet.Matcher
that can be used to identify the fonts that shall
be referenced rather than embedded.
matcher
- the font triplet matcherpublic FontTriplet.Matcher getReferencedFontsMatcher()
FontTriplet.Matcher
that can be used to identify the fonts that shall
be referenced rather than embedded.
public void updateReferencedFonts(java.util.List<EmbedFontInfo> fontInfoList)
getReferencedFontsMatcher()
).
fontInfoList
- a font info listpublic void updateReferencedFonts(java.util.List<EmbedFontInfo> fontInfoList, FontTriplet.Matcher matcher)
fontInfoList
- a font info listmatcher
- the font triplet matcher to usepublic void autoDetectFonts(boolean autoDetectFonts, FontAdder fontAdder, boolean strict, FontEventListener listener, java.util.List<EmbedFontInfo> fontInfoList) throws FOPException
autoDetectFonts
- if autodetect has been enabledfontAdder
- the font adding mechanismstrict
- whether to enforce strict validationlistener
- the listener for font related eventsfontInfoList
- a list of font info objects
FOPException
- if an exception was thrown auto-detecting fonts
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |