|
fop 2.2 | |||||||||
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 boolean |
embedded
true if the font will be embedded, false if it will be referenced only. |
protected java.net.URI |
fontFileURI
URI representing the font file |
protected boolean |
loaded
true if the font has been loaded |
protected static org.apache.commons.logging.Log |
log
logging instance |
protected InternalResourceResolver |
resourceResolver
the resource resolver to use for font URI resolution |
protected CustomFont |
returnFont
the loaded font |
protected boolean |
useAdvanced
true if advanced typographic information shall be loaded if available. |
protected boolean |
useKerning
true if kerning information false be loaded if available. |
Constructor Summary | |
---|---|
FontLoader(java.net.URI fontFileURI,
boolean embedded,
boolean useKerning,
boolean useAdvanced,
InternalResourceResolver resourceResolver)
Default constructor. |
Method Summary | |
---|---|
CustomFont |
getFont()
Returns the custom font that was read using this instance of FontLoader. |
static CustomFont |
loadFont(FontUris fontUris,
java.lang.String subFontName,
boolean embedded,
EmbeddingMode embeddingMode,
EncodingMode encodingMode,
boolean useKerning,
boolean useAdvanced,
InternalResourceResolver resourceResolver,
boolean simulateStyle,
boolean embedAsType1)
Loads a custom font from a URI. |
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 final org.apache.commons.logging.Log log
protected final java.net.URI fontFileURI
protected final InternalResourceResolver resourceResolver
protected CustomFont returnFont
protected boolean loaded
protected boolean embedded
protected boolean useKerning
protected boolean useAdvanced
Constructor Detail |
---|
public FontLoader(java.net.URI fontFileURI, boolean embedded, boolean useKerning, boolean useAdvanced, InternalResourceResolver resourceResolver)
fontFileURI
- the URI to the PFB file of a Type 1 fontembedded
- indicates whether the font is embedded or referenceduseKerning
- indicates whether kerning information shall be loaded if availableuseAdvanced
- indicates whether advanced typographic information shall be loaded if
availableresourceResolver
- the font resolver used to resolve URIsMethod Detail |
---|
public static CustomFont loadFont(FontUris fontUris, java.lang.String subFontName, boolean embedded, EmbeddingMode embeddingMode, EncodingMode encodingMode, boolean useKerning, boolean useAdvanced, InternalResourceResolver resourceResolver, boolean simulateStyle, boolean embedAsType1) throws java.io.IOException
fontUris
- the URI to the fontsubFontName
- the sub-fontname of a font (for TrueType Collections, null otherwise)embedded
- indicates whether the font is embedded or referencedembeddingMode
- the embedding mode of the fontencodingMode
- the requested encoding modeuseKerning
- indicates whether kerning information should be loaded if availableuseAdvanced
- indicates whether advanced typographic information shall be loaded if
availableresourceResolver
- the font resolver to use when resolving URIs
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
- if an I/O error occurs
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |