Class CFFType1Font
java.lang.Object
org.apache.fontbox.cff.CFFFont
org.apache.fontbox.cff.CFFType1Font
- All Implemented Interfaces:
EncodedFont, FontBoxFont
A Type 1-equivalent font program represented in a CFF file. Thread safe.
- Author:
- Villu Ruusmann, John Hewson
-
Field Summary
Fields inherited from class CFFFont
charset, charStrings, fontName, globalSubrIndex, topDict -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the CFFEncoding of the font.Returns the FontMatrix.Returns the path for the character with the given name.Returns the private dictionary.getType1CharString(String name) Returns the Type 1 charstring for the given PostScript glyph name.getType2CharString(int gid) Returns the Type 1 charstring for the given GID.floatReturns the advance width for the character with the given name.booleanReturns true if the font contains the given glyph.intReturns the GID for the given PostScript glyph name.Methods inherited from class CFFFont
addValueToTopDict, getCharset, getCharStringBytes, getData, getFontBBox, getGlobalSubrIndex, getName, getNumCharStrings, getTopDict, toString
-
Constructor Details
-
CFFType1Font
public CFFType1Font()
-
-
Method Details
-
getPath
Description copied from interface:FontBoxFontReturns the path for the character with the given name.- Specified by:
getPathin interfaceFontBoxFont- Returns:
- glyph path
- Throws:
IOException- if the path could not be read
-
getWidth
Description copied from interface:FontBoxFontReturns the advance width for the character with the given name.- Specified by:
getWidthin interfaceFontBoxFont- Returns:
- glyph advance width
- Throws:
IOException- if the path could not be read
-
hasGlyph
Description copied from interface:FontBoxFontReturns true if the font contains the given glyph.- Specified by:
hasGlyphin interfaceFontBoxFont- Parameters:
name- PostScript glyph name
-
getFontMatrix
Description copied from class:CFFFontReturns the FontMatrix.- Specified by:
getFontMatrixin interfaceFontBoxFont- Specified by:
getFontMatrixin classCFFFont
-
getType1CharString
Returns the Type 1 charstring for the given PostScript glyph name.- Parameters:
name- PostScript glyph name- Throws:
IOException- if the charstring could not be read
-
nameToGID
Returns the GID for the given PostScript glyph name.- Parameters:
name- a PostScript glyph name.- Returns:
- GID
-
getType2CharString
Returns the Type 1 charstring for the given GID.- Specified by:
getType2CharStringin classCFFFont- Parameters:
gid- GID- Throws:
IOException- if the charstring could not be read
-
getPrivateDict
-
getEncoding
Returns the CFFEncoding of the font.- Specified by:
getEncodingin interfaceEncodedFont- Returns:
- the encoding
-