Package com.tom_roush.fontbox.ttf
Class OTFParser
- java.lang.Object
-
- com.tom_roush.fontbox.ttf.TTFParser
-
- com.tom_roush.fontbox.ttf.OTFParser
-
public final class OTFParser extends TTFParser
OpenType font file parser.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenTypeFontparse(File file)Parse a file and get a true type font.OpenTypeFontparse(InputStream data)Parse a file and get a true type font.OpenTypeFontparse(String file)Parse a file and get a true type font.protected TTFTablereadTable(TrueTypeFont font, String tag)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.fontbox.ttf.TTFParser
parseEmbedded
-
-
-
-
Constructor Detail
-
OTFParser
public OTFParser()
Constructor.
-
OTFParser
public OTFParser(boolean isEmbedded)
Constructor.- Parameters:
isEmbedded- true if the font is embedded in PDF
-
OTFParser
public OTFParser(boolean isEmbedded, boolean parseOnDemand)Constructor.- Parameters:
isEmbedded- true if the font is embedded in PDFparseOnDemand- true if the tables of the font should be parsed on demand
-
-
Method Detail
-
parse
public OpenTypeFont parse(String file) throws IOException
Description copied from class:TTFParserParse a file and get a true type font.- Overrides:
parsein classTTFParser- Parameters:
file- The TTF file.- Returns:
- A true type font.
- Throws:
IOException- If there is an error parsing the true type font.
-
parse
public OpenTypeFont parse(File file) throws IOException
Description copied from class:TTFParserParse a file and get a true type font.- Overrides:
parsein classTTFParser- Parameters:
file- The TTF file.- Returns:
- A true type font.
- Throws:
IOException- If there is an error parsing the true type font.
-
parse
public OpenTypeFont parse(InputStream data) throws IOException
Description copied from class:TTFParserParse a file and get a true type font.- Overrides:
parsein classTTFParser- Parameters:
data- The TTF data to parse.- Returns:
- A true type font.
- Throws:
IOException- If there is an error parsing the true type font.
-
readTable
protected TTFTable readTable(TrueTypeFont font, String tag)
-
-