Package org.apache.fop.tools.fontlist
Class FontListGenerator
java.lang.Object
org.apache.fop.tools.fontlist.FontListGenerator
Generates a list of available fonts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate SortedMap
buildFamilyMap
(FontInfo fontInfo) listFonts
(FopFactory fopFactory, String mime, FontEventListener listener) List all fonts configured for a particular output format (identified by MIME type).private FontInfo
setupFonts
(FopFactory fopFactory, String mime, FontEventListener listener)
-
Constructor Details
-
FontListGenerator
public FontListGenerator()
-
-
Method Details
-
listFonts
public SortedMap listFonts(FopFactory fopFactory, String mime, FontEventListener listener) throws FOPException List all fonts configured for a particular output format (identified by MIME type). The sorted map returned looks like this:SortedMap<String/font-family, List<
FontSpec
>>- Parameters:
fopFactory
- the FOP factory (already configured)mime
- the MIME type identified the selected output formatlistener
- a font event listener to catch any font-related errors while listing fonts- Returns:
- the map of font families
- Throws:
FOPException
- if an error occurs setting up the fonts
-
setupFonts
private FontInfo setupFonts(FopFactory fopFactory, String mime, FontEventListener listener) throws FOPException - Throws:
FOPException
-
buildFamilyMap
-