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 Type
    Method
    Description
    Returns the font's bounding box in PostScript units.
    Returns the FontMatrix in PostScript units.
    The PostScript name of the font.
    Returns the path for the character with the given name.
    float
    Returns the advance width for the character with the given name.
    boolean
    Returns true if the font contains the given glyph.
  • Method Details

    • getName

      String getName() throws IOException
      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

      BoundingBox getFontBBox() throws IOException
      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

      List<Number> getFontMatrix() throws IOException
      Returns the FontMatrix in PostScript units.
      Returns:
      the font matrix
      Throws:
      IOException - if something went wrong when accessing the font data
    • getPath

      GeneralPath getPath(String name) throws IOException
      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

      float getWidth(String name) throws IOException
      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

      boolean hasGlyph(String name) throws IOException
      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