Class JavaDSSFontMetrics

java.lang.Object
eu.europa.esig.dss.pdf.visible.AbstractDSSFontMetrics
eu.europa.esig.dss.pdf.pdfbox.visible.defaultdrawer.JavaDSSFontMetrics
All Implemented Interfaces:
DSSFontMetrics

public class JavaDSSFontMetrics extends AbstractDSSFontMetrics
Contains font metrics for a Java font
  • Constructor Details

    • JavaDSSFontMetrics

      public JavaDSSFontMetrics(Font javaFont)
      Default constructor
      Parameters:
      javaFont - Font
  • Method Details

    • getWidth

      public float getWidth(String str, float size)
      Description copied from interface: DSSFontMetrics
      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

      public float getHeight(String str, float size)
      Description copied from interface: DSSFontMetrics
      Computes a height for a string of a given size
      Parameters:
      str - String to get height of
      size - of a string
      Returns:
      string width
    • getMaxAscent

      public float getMaxAscent(float size)
      Returns the max ascent for the given font size
      Parameters:
      size - font size
      Returns:
      max ascent