Constructor and Description |
---|
TTFParser()
Constructor.
|
TTFParser(boolean isEmbedded)
Constructor.
|
TTFParser(boolean isEmbedded,
boolean parseOnDemand)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TrueTypeFont |
parse(File ttfFile)
Parse a file and return a TrueType font.
|
TrueTypeFont |
parse(InputStream inputStream)
Parse an input stream and return a TrueType font.
|
TrueTypeFont |
parse(String ttfFile)
Parse a file and return a TrueType font.
|
TrueTypeFont |
parseEmbedded(InputStream inputStream)
Parse an input stream and return a TrueType font that is to be embedded.
|
protected TTFTable |
readTable(TrueTypeFont font,
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(String ttfFile) throws IOException
ttfFile
- The TrueType font filename.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parse(File ttfFile) throws IOException
ttfFile
- The TrueType font file.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parse(InputStream inputStream) throws IOException
inputStream
- The TTF data stream to parse from. It will be closed before returning.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parseEmbedded(InputStream inputStream) throws IOException
inputStream
- 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–2016 The Apache Software Foundation. All rights reserved.