Class CFFFont
java.lang.Object
org.apache.fontbox.cff.CFFFont
- All Implemented Interfaces:
FontBoxFont
- Direct Known Subclasses:
CFFCIDFont, CFFType1Font
An Adobe Compact Font Format (CFF) font. Thread safe.
- Author:
- Villu Ruusmann, John Hewson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CFFCharsetprotected byte[][]protected Stringprotected byte[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddValueToTopDict(String name, Object value) Adds the given key/value pair to the top dictionary.Returns the CFFCharset of the font.final List<byte[]> Returns the character strings dictionary.byte[]getData()Returns the CFF data.Returns the FontBBox.Returns the FontMatrix.List<byte[]> Returns the list containing the global subroutines.getName()The name of the font.intReturns the number of charstrings in the font.Returns the top dictionary.abstract Type2CharStringgetType2CharString(int cidOrGid) Returns the Type 2 charstring for the given CID.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FontBoxFont
getPath, getWidth, hasGlyph
-
Field Details
-
fontName
-
topDict
-
charset
-
charStrings
protected byte[][] charStrings -
globalSubrIndex
protected byte[][] globalSubrIndex
-
-
Constructor Details
-
CFFFont
public CFFFont()
-
-
Method Details
-
getName
The name of the font.- Specified by:
getNamein interfaceFontBoxFont- Returns:
- the name of the font
-
addValueToTopDict
-
getTopDict
-
getFontMatrix
Returns the FontMatrix.- Specified by:
getFontMatrixin interfaceFontBoxFont
-
getFontBBox
Returns the FontBBox.- Specified by:
getFontBBoxin interfaceFontBoxFont
-
getCharset
-
getCharStringBytes
Returns the character strings dictionary. For expert users only.- Returns:
- the character strings dictionary as a list of byte arrays.
-
getData
-
getNumCharStrings
public int getNumCharStrings()Returns the number of charstrings in the font. -
getGlobalSubrIndex
Returns the list containing the global subroutines.- Returns:
- a list of the global subroutines.
-
getType2CharString
Returns the Type 2 charstring for the given CID.- Parameters:
cidOrGid- CID for CIFFont, or GID for Type 1 font- Throws:
IOException- if the charstring could not be read
-
toString
-