Package org.apache.fontbox.ttf
Class CIDFontType2Parser
- java.lang.Object
-
- org.apache.fontbox.ttf.CIDFontType2Parser
-
public class CIDFontType2Parser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isEmbedded
protected boolean
parseOnDemandOnly
-
Constructor Summary
Constructors Constructor Description CIDFontType2Parser()
CIDFontType2Parser(boolean isEmbedded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
parseTTF
public TrueTypeFont parseTTF(java.lang.String ttfFile) throws java.io.IOException
Parse a file and get a TrueType font.- Parameters:
ttfFile
- The TrueType file name.- Returns:
- A TrueType font.
- Throws:
java.io.IOException
- If there is an error parsing the TrueType font.
-
parseTTF
public TrueTypeFont parseTTF(java.io.File ttfFile) throws java.io.IOException
Parse a file and get a TrueType font.- Parameters:
ttfFile
- The TrueType file.- Returns:
- A TrueType font.
- Throws:
java.io.IOException
- If there is an error parsing the TrueType font.
-
parseTTF
public TrueTypeFont parseTTF(java.io.InputStream inputStream) throws java.io.IOException
Parse an input stream and return a TrueType font.- Parameters:
inputStream
- The TTF data stream to parse from. It will be closed before returning.- Returns:
- A TrueType font.
- Throws:
java.io.IOException
- If there is an error parsing the TrueType font.
-
parseTTF
public TrueTypeFont parseTTF(TTFDataStream raf) throws java.io.IOException
Parse a TrueType data stream and get a TrueType font.- Parameters:
raf
- The TrueType file.- Returns:
- A TrueType font.
- Throws:
java.io.IOException
- If there is an error parsing the TrueType font.
-
parseTables
protected void parseTables(TrueTypeFont font, TTFDataStream raf) throws java.io.IOException
Parse all tables and check if all needed tables are present.- Parameters:
font
- the TrueTypeFont instance holding the parsed data.raf
- the data stream of the to be parsed ttf font- Throws:
java.io.IOException
- If there is an error parsing the TrueType font.
-
-