Package snap.text

Class TextMetrics

java.lang.Object
snap.text.TextMetrics

public class TextMetrics extends Object
A class to hold the font metrics for text.
  • Field Details

    • _ascent

      protected double _ascent
    • _descent

      protected double _descent
    • _leading

      protected double _leading
    • _lineAdvance

      protected double _lineAdvance
  • Constructor Details

    • TextMetrics

      public TextMetrics(TextLine textLine)
      Constructor.
  • Method Details

    • getAscent

      public double getAscent()
      Returns the max ascent of the chars in this line.
    • getDescent

      public double getDescent()
      Returns the max descent of the chars in this line.
    • getLeading

      public double getLeading()
      Returns the leading of the chars in this line.
    • getLineAdvance

      public double getLineAdvance()
      Returns the vertical distance for any line below this line.