Package org.apache.fontbox
Interface FontBoxFont
- All Known Implementing Classes:
CFFCIDFont,CFFFont,CFFType1Font,OpenTypeFont,TrueTypeFont,Type1Font
public interface FontBoxFont
Common interface for all FontBox fonts.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the font's bounding box in PostScript units.Returns the FontMatrix in PostScript units.getName()The PostScript name of the font.Returns the path for the character with the given name.floatReturns the advance width for the character with the given name.booleanReturns true if the font contains the given glyph.
-
Method Details
-
getName
The PostScript name of the font.- Returns:
- the postscript of the font or null
- Throws:
IOException- if something went wrong when accessing the font data
-
getFontBBox
Returns the font's bounding box in PostScript units.- Returns:
- the bounding box of the font
- Throws:
IOException- if something went wrong when accessing the font data
-
getFontMatrix
Returns the FontMatrix in PostScript units.- Returns:
- the font matrix
- Throws:
IOException- if something went wrong when accessing the font data
-
getPath
Returns the path for the character with the given name.- Parameters:
name- PostScript glyph name- Returns:
- glyph path
- Throws:
IOException- if the path could not be read
-
getWidth
Returns the advance width for the character with the given name.- Parameters:
name- PostScript glyph name- Returns:
- glyph advance width
- Throws:
IOException- if the path could not be read
-
hasGlyph
Returns true if the font contains the given glyph.- Parameters:
name- PostScript glyph name- Returns:
- true if the font contains a glyph with the given name, otherwise false
- Throws:
IOException- if something went wrong when accessing the font data
-