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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoundingBox
getFontBBox()
Returns the font's bounding box in PostScript units.java.util.List<java.lang.Number>
getFontMatrix()
Returns the FontMatrix in PostScript units.java.lang.String
getName()
The PostScript name of the font.java.awt.geom.GeneralPath
getPath(java.lang.String name)
Returns the path for the character with the given name.float
getWidth(java.lang.String name)
Returns the advance width for the character with the given name.boolean
hasGlyph(java.lang.String name)
Returns true if the font contains the given glyph.
-
-
-
Method Detail
-
getName
java.lang.String getName() throws java.io.IOException
The PostScript name of the font.- Throws:
java.io.IOException
-
getFontBBox
BoundingBox getFontBBox() throws java.io.IOException
Returns the font's bounding box in PostScript units.- Throws:
java.io.IOException
-
getFontMatrix
java.util.List<java.lang.Number> getFontMatrix() throws java.io.IOException
Returns the FontMatrix in PostScript units.- Throws:
java.io.IOException
-
getPath
java.awt.geom.GeneralPath getPath(java.lang.String name) throws java.io.IOException
Returns the path for the character with the given name.- Returns:
- glyph path
- Throws:
java.io.IOException
- if the path could not be read
-
getWidth
float getWidth(java.lang.String name) throws java.io.IOException
Returns the advance width for the character with the given name.- Returns:
- glyph advance width
- Throws:
java.io.IOException
- if the path could not be read
-
hasGlyph
boolean hasGlyph(java.lang.String name) throws java.io.IOException
Returns true if the font contains the given glyph.- Parameters:
name
- PostScript glyph name- Throws:
java.io.IOException
-
-