Package org.apache.fontbox.cff
Class CFFParser
java.lang.Object
org.apache.fontbox.cff.CFFParser
This class represents a parser for a CFF font.
- Author:
- Villu Ruusmann
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSource from which bytes may be read in the future. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse(byte[] bytes, CFFParser.ByteSource source) Parse CFF font using byte array, also passing in a byte source for future use.parse(org.apache.pdfbox.io.RandomAccessRead randomAccessRead) Parse CFF font using a RandomAccessRead as input.voidparseFirstSubFontROS(org.apache.pdfbox.io.RandomAccessRead randomAccessRead, FontHeaders outHeaders) Extract "Registry", "Ordering" and "Supplement" properties from the first CFF subfont.toString()
-
Constructor Details
-
CFFParser
public CFFParser()
-
-
Method Details
-
parse
Parse CFF font using byte array, also passing in a byte source for future use.- Parameters:
bytes- source bytessource- source to re-read bytes from in the future- Returns:
- the parsed CFF fonts
- Throws:
IOException- If there is an error reading from the stream
-
parse
public List<CFFFont> parse(org.apache.pdfbox.io.RandomAccessRead randomAccessRead) throws IOException Parse CFF font using a RandomAccessRead as input.- Parameters:
randomAccessRead- the source to be parsed- Returns:
- the parsed CFF fonts
- Throws:
IOException- If there is an error reading from the stream
-
parseFirstSubFontROS
public void parseFirstSubFontROS(org.apache.pdfbox.io.RandomAccessRead randomAccessRead, FontHeaders outHeaders) throws IOException Extract "Registry", "Ordering" and "Supplement" properties from the first CFF subfont.- Parameters:
randomAccessRead- the source to be parsedoutHeaders- where to put results- Throws:
IOException- If there is an error reading from the stream
-
toString
-