Record Class FKMetrics

java.lang.Object
java.lang.Record
dev.pfaff.altargui.pathfinder.fontkit.FKMetrics
Record Components:
unitsPerEm - the number of font units per em
ascent - the maximum amount the font rises above the baseline, in font units
descent - the maximum amount the font descends below the baseline, in font units
lineGap - distance between baselines, in font units
underlinePosition - the suggested distance of the top of the underline from the baseline (negative values indicate below baseline), in font units
underlineThickness - a suggested value for the underline thickness, in font units
capHeight - the approximate amount that uppercase letters rise above the baseline, in font units
xHeight - the approximate amount that non-ascending lowercase letters rise above the baseline, in font units
boundingBox - a rectangle that surrounds all bounding boxes of all glyphs, in font units

public record FKMetrics(int unitsPerEm, float ascent, float descent, float lineGap, float underlinePosition, float underlineThickness, float capHeight, float xHeight, RectF boundingBox) extends Record
  • Constructor Details

    • FKMetrics

      public FKMetrics(int unitsPerEm, float ascent, float descent, float lineGap, float underlinePosition, float underlineThickness, float capHeight, float xHeight, RectF boundingBox)
      Creates an instance of a FKMetrics record class.
      Parameters:
      unitsPerEm - the value for the unitsPerEm record component
      ascent - the value for the ascent record component
      descent - the value for the descent record component
      lineGap - the value for the lineGap record component
      underlinePosition - the value for the underlinePosition record component
      underlineThickness - the value for the underlineThickness record component
      capHeight - the value for the capHeight record component
      xHeight - the value for the xHeight record component
      boundingBox - the value for the boundingBox record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • unitsPerEm

      public int unitsPerEm()
      Returns the value of the unitsPerEm record component.
      Returns:
      the value of the unitsPerEm record component
    • ascent

      public float ascent()
      Returns the value of the ascent record component.
      Returns:
      the value of the ascent record component
    • descent

      public float descent()
      Returns the value of the descent record component.
      Returns:
      the value of the descent record component
    • lineGap

      public float lineGap()
      Returns the value of the lineGap record component.
      Returns:
      the value of the lineGap record component
    • underlinePosition

      public float underlinePosition()
      Returns the value of the underlinePosition record component.
      Returns:
      the value of the underlinePosition record component
    • underlineThickness

      public float underlineThickness()
      Returns the value of the underlineThickness record component.
      Returns:
      the value of the underlineThickness record component
    • capHeight

      public float capHeight()
      Returns the value of the capHeight record component.
      Returns:
      the value of the capHeight record component
    • xHeight

      public float xHeight()
      Returns the value of the xHeight record component.
      Returns:
      the value of the xHeight record component
    • boundingBox

      public RectF boundingBox()
      Returns the value of the boundingBox record component.
      Returns:
      the value of the boundingBox record component