public class TTFParser
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
protected boolean |
isEmbedded |
|
protected boolean |
parseOnDemandOnly |
Constructor | Description |
---|---|
TTFParser() |
Constructor.
|
TTFParser(boolean isEmbedded) |
Constructor.
|
TTFParser(boolean isEmbedded,
boolean parseOnDemand) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
static void |
main(java.lang.String[] args) |
A simple command line program to test parsing of a TTF file.
|
protected void |
parseTables(TrueTypeFont font,
TTFDataStream raf) |
Parse all tables and check if all needed tables are present.
|
TrueTypeFont |
parseTTF(java.io.File ttfFile) |
Parse a file and get a TrueType font.
|
TrueTypeFont |
parseTTF(java.io.InputStream inputStream) |
Parse an input stream and return a TrueType font.
|
TrueTypeFont |
parseTTF(java.lang.String ttfFile) |
Parse a file and get a TrueType font.
|
TrueTypeFont |
parseTTF(TTFDataStream raf) |
Parse a TrueType data stream and get a TrueType font.
|
protected boolean isEmbedded
protected boolean parseOnDemandOnly
public TTFParser()
public TTFParser(boolean isEmbedded)
isEmbedded
- indicates whether the font is embedded or not.public TTFParser(boolean isEmbedded, boolean parseOnDemand)
isEmbedded
- indicates whether the font is embedded or not.parseOnDemand
- indicates whether the tables of the font should be parsed on demand only or not.public static void main(java.lang.String[] args) throws java.io.IOException
args
- The command line arguments.java.io.IOException
- If there is an error while parsing the font file.protected void parseTables(TrueTypeFont font, TTFDataStream raf) throws java.io.IOException
font
- the TrueTypeFont instance holding the parsed data.raf
- the data stream of the to be parsed ttf fontjava.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parseTTF(java.lang.String ttfFile) throws java.io.IOException
ttfFile
- The TrueType file name.java.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parseTTF(java.io.File ttfFile) throws java.io.IOException
ttfFile
- The TrueType file.java.io.IOException
- If there is an error parsing the TrueType font.public TrueTypeFont parseTTF(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 parseTTF(TTFDataStream raf) throws java.io.IOException
raf
- The TrueType file.java.io.IOException
- If there is an error parsing the TrueType font.Copyright © 2008–2018. All rights reserved.