Class TTFFontLoader
java.lang.Object
org.docx4j.fonts.fop.fonts.FontLoader
org.docx4j.fonts.fop.fonts.truetype.TTFFontLoader
public class TTFFontLoader extends FontLoader
Loads a TrueType font into memory directly from the original font file.
-
Field Summary
Fields inherited from class org.docx4j.fonts.fop.fonts.FontLoader
embedded, fontFileURI, loaded, log, resolver, returnFont, useKerning -
Constructor Summary
Constructors Constructor Description TTFFontLoader(java.lang.String fontFileURI, java.lang.String subFontName, boolean embedded, EncodingMode encodingMode, boolean useKerning, FontResolver resolver)Additional constructor for TrueType Collections.TTFFontLoader(java.lang.String fontFileURI, FontResolver resolver)Default constructor -
Method Summary
Modifier and Type Method Description protected voidread()Reads/parses the font data.Methods inherited from class org.docx4j.fonts.fop.fonts.FontLoader
getFont, loadFont, loadFont, loadFont, openFontUri
-
Constructor Details
-
TTFFontLoader
Default constructor- Parameters:
fontFileURI- the URI representing the font fileresolver- the FontResolver for font URI resolution
-
TTFFontLoader
public TTFFontLoader(java.lang.String fontFileURI, java.lang.String subFontName, boolean embedded, EncodingMode encodingMode, boolean useKerning, FontResolver resolver)Additional constructor for TrueType Collections.- Parameters:
fontFileURI- the URI representing the font filesubFontName- the sub-fontname of a font in a TrueType Collection (or null for normal TrueType fonts)embedded- indicates whether the font is embedded or referencedencodingMode- the requested encoding modeuseKerning- true to enable loading kerning info if available, false to disableresolver- the FontResolver for font URI resolution
-
-
Method Details
-
read
protected void read() throws java.io.IOExceptionReads/parses the font data.- Specified by:
readin classFontLoader- Throws:
java.io.IOException- In case of an I/O error
-