Package org.apache.fop.fonts
Class DefaultFontConfigurator
java.lang.Object
org.apache.fop.fonts.DefaultFontConfigurator
- All Implemented Interfaces:
FontConfigurator<EmbedFontInfo>
The default configurator for fonts. This configurator can configure the more generic fonts used
by the renderers i.e. TTF, Type1 etc...
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FontManager
private final FontEventListener
protected static final org.apache.commons.logging.Log
logger instanceprivate final InternalResourceResolver
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFontConfigurator
(FontManager fontManager, FontEventListener listener, boolean strict) Main constructor -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addDirectories
(DefaultFontConfig fontInfoConfig, FontAdder fontAdder, List<EmbedFontInfo> fontInfoList) private void
addFonts
(DefaultFontConfig fontInfoConfig, FontCache fontCache, List<EmbedFontInfo> fontInfoList) configure
(FontConfig fontInfoConfig) Initializes font info settings from the user configurationprivate EmbedFontInfo
getFontInfo
(DefaultFontConfig.Font font, FontCache fontCache)
-
Field Details
-
log
protected static final org.apache.commons.logging.Log loglogger instance -
fontManager
-
resourceResolver
-
listener
-
strict
private final boolean strict
-
-
Constructor Details
-
DefaultFontConfigurator
Main constructor- Parameters:
fontManager
- the font managerlistener
- the font event listenerstrict
- true if an Exception should be thrown if an error is found.
-
-
Method Details
-
configure
Initializes font info settings from the user configuration- Specified by:
configure
in interfaceFontConfigurator<EmbedFontInfo>
- Returns:
- a font info list
- Throws:
FOPException
- if an exception occurs while processing the configuration
-
addDirectories
private void addDirectories(DefaultFontConfig fontInfoConfig, FontAdder fontAdder, List<EmbedFontInfo> fontInfoList) throws FOPException - Throws:
FOPException
-
addFonts
private void addFonts(DefaultFontConfig fontInfoConfig, FontCache fontCache, List<EmbedFontInfo> fontInfoList) throws FOPException, URISyntaxException - Throws:
FOPException
URISyntaxException
-
getFontInfo
private EmbedFontInfo getFontInfo(DefaultFontConfig.Font font, FontCache fontCache) throws FOPException, URISyntaxException - Throws:
FOPException
URISyntaxException
-