Top Description Methods
org.apache.fontbox

public Interface FontBoxFont

Known Direct Implementers
org.apache.fontbox.cff.CFFFont, org.apache.fontbox.ttf.TrueTypeFont, org.apache.fontbox.type1.Type1Font
Imports
java.awt.geom.GeneralPath, java.io.IOException, java.util.List, org.apache.fontbox.util.BoundingBox

Common interface for all FontBox fonts.
Author
John Hewson

Method Summary

Modifier and TypeMethod and Description
public BoundingBox

Returns:

the bounding box of the font
getFontBBox
()

Returns the font's bounding box in PostScript units.

public List<Number>

Returns:

the font matrix
getFontMatrix
()

Returns the FontMatrix in PostScript units.

public String

Returns:

the postscript of the font or null
getName
()

The PostScript name of the font.

public GeneralPath

Returns:

glyph path
getPath
(String
PostScript glyph name
name
)

Returns the path for the character with the given name.

public float

Returns:

glyph advance width
getWidth
(String
PostScript glyph name
name
)

Returns the advance width for the character with the given name.

public boolean

Returns:

true if the font contains a glyph with the given name, otherwise false
hasGlyph
(String
PostScript glyph name
name
)

Returns true if the font contains the given glyph.

Method Detail

getFontBBoxback to summary
public BoundingBox getFontBBox() throws IOException

Returns the font's bounding box in PostScript units.

Returns:BoundingBox

the bounding box of the font

Exceptions
IOException:
if something went wrong when accessing the font data
getFontMatrixback to summary
public List<Number> getFontMatrix() throws IOException

Returns the FontMatrix in PostScript units.

Returns:List<Number>

the font matrix

Exceptions
IOException:
if something went wrong when accessing the font data
getNameback to summary
public String getName() throws IOException

The PostScript name of the font.

Returns:String

the postscript of the font or null

Exceptions
IOException:
if something went wrong when accessing the font data
getPathback to summary
public GeneralPath getPath(String name) throws IOException

Returns the path for the character with the given name.

Parameters
name:String

PostScript glyph name

Returns:GeneralPath

glyph path

Exceptions
IOException:
if the path could not be read
getWidthback to summary
public float getWidth(String name) throws IOException

Returns the advance width for the character with the given name.

Parameters
name:String

PostScript glyph name

Returns:float

glyph advance width

Exceptions
IOException:
if the path could not be read
hasGlyphback to summary
public boolean hasGlyph(String name) throws IOException

Returns true if the font contains the given glyph.

Parameters
name:String

PostScript glyph name

Returns:boolean

true if the font contains a glyph with the given name, otherwise false

Exceptions
IOException:
if something went wrong when accessing the font data