Package org.apache.fop.tools.fontlist
Class FontListSerializer
- java.lang.Object
-
- org.apache.fop.tools.fontlist.FontListSerializer
-
public class FontListSerializer extends java.lang.Object
Turns the font list into SAX events.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CDATA
private static java.lang.String
FAMILY
private static java.lang.String
FONT
private static java.lang.String
FONTS
private static java.lang.String
KEY
private static java.lang.String
NAME
private java.util.regex.Pattern
quotePattern
private static java.lang.String
STRIPPED_NAME
private static java.lang.String
STYLE
private static java.lang.String
TRIPLET
private static java.lang.String
TRIPLETS
private static java.lang.String
TYPE
private static java.lang.String
WEIGHT
-
Constructor Summary
Constructors Constructor Description FontListSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateSAX(java.util.SortedMap fontFamilies, java.lang.String singleFamily, GenerationHelperContentHandler handler)
Generates SAX events from the font damily map.void
generateSAX(java.util.SortedMap fontFamilies, GenerationHelperContentHandler handler)
Generates SAX events from the font damily map.private void
generateXMLForFontContainers(GenerationHelperContentHandler handler, java.util.List containers)
private void
generateXMLForTriplets(GenerationHelperContentHandler handler, java.util.Collection triplets)
private java.lang.String
stripQuotes(java.lang.String name)
-
-
-
Field Detail
-
FONTS
private static final java.lang.String FONTS
- See Also:
- Constant Field Values
-
FAMILY
private static final java.lang.String FAMILY
- See Also:
- Constant Field Values
-
FONT
private static final java.lang.String FONT
- See Also:
- Constant Field Values
-
TRIPLETS
private static final java.lang.String TRIPLETS
- See Also:
- Constant Field Values
-
TRIPLET
private static final java.lang.String TRIPLET
- See Also:
- Constant Field Values
-
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
-
STRIPPED_NAME
private static final java.lang.String STRIPPED_NAME
- See Also:
- Constant Field Values
-
TYPE
private static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
KEY
private static final java.lang.String KEY
- See Also:
- Constant Field Values
-
STYLE
private static final java.lang.String STYLE
- See Also:
- Constant Field Values
-
WEIGHT
private static final java.lang.String WEIGHT
- See Also:
- Constant Field Values
-
CDATA
private static final java.lang.String CDATA
- See Also:
- Constant Field Values
-
quotePattern
private final java.util.regex.Pattern quotePattern
-
-
Method Detail
-
generateSAX
public void generateSAX(java.util.SortedMap fontFamilies, GenerationHelperContentHandler handler) throws org.xml.sax.SAXException
Generates SAX events from the font damily map.- Parameters:
fontFamilies
- the font familieshandler
- the target SAX handler- Throws:
org.xml.sax.SAXException
- if an XML-related exception occurs
-
generateSAX
public void generateSAX(java.util.SortedMap fontFamilies, java.lang.String singleFamily, GenerationHelperContentHandler handler) throws org.xml.sax.SAXException
Generates SAX events from the font damily map.- Parameters:
fontFamilies
- the font familiessingleFamily
- if not null, the output will be filtered so only this single font family will be usedhandler
- the target SAX handler- Throws:
org.xml.sax.SAXException
- if an XML-related exception occurs
-
stripQuotes
private java.lang.String stripQuotes(java.lang.String name)
-
generateXMLForFontContainers
private void generateXMLForFontContainers(GenerationHelperContentHandler handler, java.util.List containers) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
generateXMLForTriplets
private void generateXMLForTriplets(GenerationHelperContentHandler handler, java.util.Collection triplets) throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
-
-