OTFParser
public class TTFParser
extends java.lang.Object
Constructor | Description |
---|---|
TTFParser() |
Constructor.
|
TTFParser(boolean isEmbedded) |
Constructor.
|
TTFParser(boolean isEmbedded,
boolean parseOnDemand) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
allowCFF() |
|
TrueTypeFont |
parse(java.io.File ttfFile) |
Parse a file and return a TrueType font.
|
TrueTypeFont |
parse(java.io.InputStream inputStream) |
Parse an input stream and return a TrueType font.
|
TrueTypeFont |
parse(java.lang.String ttfFile) |
Parse a file and return a TrueType font.
|
TrueTypeFont |
parseEmbedded(java.io.InputStream inputStream) |
Parse an input stream and return a TrueType font that is to be embedded.
|
protected TTFTable |
readTable(TrueTypeFont font,
java.lang.String tag) |
public TTFParser()
public TTFParser(boolean isEmbedded)
isEmbedded
- true if the font is embedded in PDFpublic TTFParser(boolean isEmbedded, boolean parseOnDemand)
isEmbedded
- true if the font is embedded in PDFparseOnDemand
- true if the tables of the font should be parsed on demandpublic TrueTypeFont parse(java.lang.String ttfFile) throws java.io.IOException
ttfFile
- The TrueType font filename.java.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parse(java.io.File ttfFile) throws java.io.IOException
ttfFile
- The TrueType font file.java.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parse(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- The TTF data stream to parse from. It will be closed before returning.java.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parseEmbedded(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- The TTF data stream to parse from. It will be closed before returning.java.io.IOException
- If there is an error parsing the TrueType font.protected boolean allowCFF()
protected TTFTable readTable(TrueTypeFont font, java.lang.String tag)
Copyright © 2008–2018. All rights reserved.