Package org.apache.fop.fonts
Class XMLFontMetricsReader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.fop.fonts.XMLFontMetricsReader
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
@Deprecated public class XMLFontMetricsReader extends org.xml.sax.helpers.DefaultHandler
Deprecated.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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<CMapSegment>
bfranges
Deprecated.private java.util.List<java.lang.Integer>
cidWidths
Deprecated.private java.util.Map<java.lang.Integer,java.lang.Integer>
currentKerning
Deprecated.private boolean
isCID
Deprecated.private MultiByteFont
multiFont
Deprecated.private InternalResourceResolver
resourceResolver
Deprecated.private CustomFont
returnFont
Deprecated.private SingleByteFont
singleFont
Deprecated.private java.lang.StringBuffer
text
Deprecated.
-
Constructor Summary
Constructors Constructor Description XMLFontMetricsReader(org.xml.sax.InputSource source, InternalResourceResolver resourceResolver)
Deprecated.Construct a XMLFontMetricsReader object from a path to a metric.xml file and read metric data
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Deprecated.private void
createFont(org.xml.sax.InputSource source)
Deprecated.void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
Deprecated.Typeface
getFont()
Deprecated.Get the generated font objectprivate int
getInt(java.lang.String str)
Deprecated.void
setAdvancedEnabled(boolean enabled)
Deprecated.Enable/disable use of advanced typographic features for the fontvoid
setFontEmbedURI(java.net.URI path)
Deprecated.Sets the path to embed a font.void
setKerningEnabled(boolean enabled)
Deprecated.Enable/disable use of kerning for the fontvoid
startDocument()
Deprecated.void
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
Deprecated.
-
-
-
Field Detail
-
isCID
private boolean isCID
Deprecated.
-
returnFont
private CustomFont returnFont
Deprecated.
-
multiFont
private MultiByteFont multiFont
Deprecated.
-
singleFont
private SingleByteFont singleFont
Deprecated.
-
resourceResolver
private final InternalResourceResolver resourceResolver
Deprecated.
-
text
private java.lang.StringBuffer text
Deprecated.
-
cidWidths
private java.util.List<java.lang.Integer> cidWidths
Deprecated.
-
currentKerning
private java.util.Map<java.lang.Integer,java.lang.Integer> currentKerning
Deprecated.
-
bfranges
private java.util.List<CMapSegment> bfranges
Deprecated.
-
-
Constructor Detail
-
XMLFontMetricsReader
public XMLFontMetricsReader(org.xml.sax.InputSource source, InternalResourceResolver resourceResolver) throws FOPException
Deprecated.Construct a XMLFontMetricsReader object from a path to a metric.xml file and read metric data- Parameters:
source
- Source of the font metric file- Throws:
FOPException
- if loading the font fails
-
-
Method Detail
-
createFont
private void createFont(org.xml.sax.InputSource source) throws FOPException
Deprecated.- Throws:
FOPException
-
setFontEmbedURI
public void setFontEmbedURI(java.net.URI path)
Deprecated.Sets the path to embed a font. A null value disables font embedding.- Parameters:
path
- URI for the embeddable file
-
setKerningEnabled
public void setKerningEnabled(boolean enabled)
Deprecated.Enable/disable use of kerning for the font- Parameters:
enabled
- true to enable kerning, false to disable
-
setAdvancedEnabled
public void setAdvancedEnabled(boolean enabled)
Deprecated.Enable/disable use of advanced typographic features for the font- Parameters:
enabled
- true to enable, false to disable
-
getFont
public Typeface getFont()
Deprecated.Get the generated font object- Returns:
- the font
-
startDocument
public void startDocument()
Deprecated.- Specified by:
startDocument
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startDocument
in classorg.xml.sax.helpers.DefaultHandler
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
Deprecated.- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
getInt
private int getInt(java.lang.String str) throws org.xml.sax.SAXException
Deprecated.- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
Deprecated.- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length)
Deprecated.- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
-
-