|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.FontLoader
public abstract class FontLoader
Base class for font loaders.
Field Summary | |
---|---|
protected java.lang.String |
fontFileURI
URI representing the font file |
protected java.io.InputStream |
in
the InputStream to load the font from |
protected boolean |
loaded
true if the font has been loaded |
protected static org.apache.commons.logging.Log |
log
logging instance |
protected FontResolver |
resolver
the FontResolver to use for font URI resolution |
protected CustomFont |
returnFont
the loaded font |
Constructor Summary | |
---|---|
FontLoader(java.lang.String fontFileURI,
java.io.InputStream in,
FontResolver resolver)
Default constructor. |
Method Summary | |
---|---|
CustomFont |
getFont()
|
static CustomFont |
loadFont(java.io.File fontFile,
FontResolver resolver)
Loads a custom font from a File. |
static CustomFont |
loadFont(java.lang.String fontFileURI,
FontResolver resolver)
Loads a custom font from a URI. |
protected static CustomFont |
loadFontFromInputStream(java.lang.String fontFileURI,
FontResolver resolver,
boolean isType1,
java.io.InputStream in)
Loads and returns a font given an input stream. |
protected abstract void |
read()
Reads/parses the font data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected java.lang.String fontFileURI
protected java.io.InputStream in
protected FontResolver resolver
protected CustomFont returnFont
protected boolean loaded
Constructor Detail |
---|
public FontLoader(java.lang.String fontFileURI, java.io.InputStream in, FontResolver resolver)
fontFileURI
- the URI to the PFB file of a Type 1 fontin
- the InputStream reading the PFM file of a Type 1 fontresolver
- the font resolver used to resolve URIsMethod Detail |
---|
public static CustomFont loadFont(java.io.File fontFile, FontResolver resolver) throws java.io.IOException
fontFile
- the File representation of the fontresolver
- the font resolver to use when resolving URIs
java.io.IOException
- In case of an I/O errorpublic static CustomFont loadFont(java.lang.String fontFileURI, FontResolver resolver) throws java.io.IOException
fontFileURI
- the URI to the fontresolver
- the font resolver to use when resolving URIs
java.io.IOException
- In case of an I/O errorprotected static CustomFont loadFontFromInputStream(java.lang.String fontFileURI, FontResolver resolver, boolean isType1, java.io.InputStream in) throws java.io.IOException
fontFileURI
- font file uriresolver
- font resolverisType1
- is it a type1 font?in
- input stream
java.io.IOException
- In case of an I/O errorprotected abstract void read() throws java.io.IOException
java.io.IOException
- In case of an I/O errorpublic CustomFont getFont() throws java.io.IOException
java.io.IOException
getFont()
|
fop 0.94 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |