@Deprecated public class XMLFontMetricsReader extends DefaultHandler
Class for reading a metric.xml file and creating a font object. Typical usage:
XMLFontMetricsReader reader = new XMLFontMetricsReader(<path til metrics.xml>); reader.setFontEmbedPath(<path to a .ttf or .pfb file or null to diable embedding>); reader.useKerning(true); Font f = reader.getFont();
N.B. This is deprecated functionality and is expected to be removed from a future version of FOP. New applications using FOP should not make direct or implied use of this mechanism.
Constructor and Description |
---|
XMLFontMetricsReader(InputSource source,
InternalResourceResolver resourceResolver)
Deprecated.
Construct a XMLFontMetricsReader object from a path to a metric.xml file
and read metric data
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Deprecated.
|
void |
endElement(String uri,
String localName,
String qName)
Deprecated.
|
Typeface |
getFont()
Deprecated.
Get the generated font object
|
void |
setAdvancedEnabled(boolean enabled)
Deprecated.
Enable/disable use of advanced typographic features for the font
|
void |
setFontEmbedURI(URI path)
Deprecated.
Sets the path to embed a font.
|
void |
setKerningEnabled(boolean enabled)
Deprecated.
Enable/disable use of kerning for the font
|
void |
startDocument()
Deprecated.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Deprecated.
|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
public XMLFontMetricsReader(InputSource source, InternalResourceResolver resourceResolver) throws FOPException
source
- Source of the font metric fileFOPException
- if loading the font failspublic void setFontEmbedURI(URI path)
path
- URI for the embeddable filepublic void setKerningEnabled(boolean enabled)
enabled
- true to enable kerning, false to disablepublic void setAdvancedEnabled(boolean enabled)
enabled
- true to enable, false to disablepublic Typeface getFont()
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
Copyright © 2025 Apache Software Foundation. All rights reserved.