public final class OTFParser extends TTFParser
Constructor and Description |
---|
OTFParser()
Constructor.
|
OTFParser(boolean isEmbedded)
Constructor.
|
OTFParser(boolean isEmbedded,
boolean parseOnDemand)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowCFF() |
OpenTypeFont |
parse(File file)
Parse a file and return a TrueType font.
|
OpenTypeFont |
parse(InputStream data)
Parse an input stream and return a TrueType font.
|
OpenTypeFont |
parse(String file)
Parse a file and return a TrueType font.
|
protected TTFTable |
readTable(TrueTypeFont font,
String tag) |
parseEmbedded
public OTFParser()
public OTFParser(boolean isEmbedded)
isEmbedded
- true if the font is embedded in PDFpublic OTFParser(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 OpenTypeFont parse(String file) throws IOException
TTFParser
parse
in class TTFParser
file
- The TrueType font filename.IOException
- If there is an error parsing the TrueType font.public OpenTypeFont parse(File file) throws IOException
TTFParser
parse
in class TTFParser
file
- The TrueType font file.IOException
- If there is an error parsing the TrueType font.public OpenTypeFont parse(InputStream data) throws IOException
TTFParser
parse
in class TTFParser
data
- The TTF data stream to parse from. It will be closed before returning.IOException
- If there is an error parsing the TrueType font.protected TTFTable readTable(TrueTypeFont font, String tag)
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.