Interface DSSFontMetrics

All Known Implementing Classes:
AbstractDSSFontMetrics, ITextDSSFontMetrics, JavaDSSFontMetrics, PdfBoxDSSFontMetrics

public interface DSSFontMetrics
Performs operations on a Font object corresponding the used implementation
  • Method Summary

    Modifier and Type
    Method
    Description
    computeTextBoundaryBox(String text, float fontSize)
    Computes a text boundary box
    float
    getHeight(String str, float size)
    Computes a height for a string of a given size
    Returns an array of strings, divided by a new line character
    float
    getWidth(String str, float size)
    Computes a width for a string of a given size
  • Method Details

    • getLines

      String[] getLines(String text)
      Returns an array of strings, divided by a new line character
      Parameters:
      text - String original text to get lines from
      Returns:
      an array of Strings
    • computeTextBoundaryBox

      AnnotationBox computeTextBoundaryBox(String text, float fontSize)
      Computes a text boundary box
      Parameters:
      text - String the original text to get Dimension for
      fontSize - the size of a font
      Returns:
      AnnotationBox of the text
    • getWidth

      float getWidth(String str, float size)
      Computes a width for a string of a given size
      Parameters:
      str - String to get width of
      size - of a string
      Returns:
      string width
    • getHeight

      float getHeight(String str, float size)
      Computes a height for a string of a given size
      Parameters:
      str - String to get height of
      size - of a string
      Returns:
      string width