Record Class FKMetrics
java.lang.Object
java.lang.Record
dev.pfaff.altargui.pathfinder.fontkit.FKMetrics
- Record Components:
unitsPerEm
- the number of font units per emascent
- the maximum amount the font rises above the baseline, in font unitsdescent
- the maximum amount the font descends below the baseline, in font unitslineGap
- distance between baselines, in font unitsunderlinePosition
- the suggested distance of the top of the underline from the baseline (negative values indicate below baseline), in font unitsunderlineThickness
- a suggested value for the underline thickness, in font unitscapHeight
- the approximate amount that uppercase letters rise above the baseline, in font unitsxHeight
- the approximate amount that non-ascending lowercase letters rise above the baseline, in font unitsboundingBox
- a rectangle that surrounds all bounding boxes of all glyphs, in font units
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
ascent()
Returns the value of theascent
record component.Returns the value of theboundingBox
record component.float
Returns the value of thecapHeight
record component.float
descent()
Returns the value of thedescent
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
lineGap()
Returns the value of thelineGap
record component.final String
toString()
Returns a string representation of this record class.float
Returns the value of theunderlinePosition
record component.float
Returns the value of theunderlineThickness
record component.int
Returns the value of theunitsPerEm
record component.float
xHeight()
Returns the value of thexHeight
record component.
-
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 aFKMetrics
record class.- Parameters:
unitsPerEm
- the value for theunitsPerEm
record componentascent
- the value for theascent
record componentdescent
- the value for thedescent
record componentlineGap
- the value for thelineGap
record componentunderlinePosition
- the value for theunderlinePosition
record componentunderlineThickness
- the value for theunderlineThickness
record componentcapHeight
- the value for thecapHeight
record componentxHeight
- the value for thexHeight
record componentboundingBox
- the value for theboundingBox
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
unitsPerEm
public int unitsPerEm()Returns the value of theunitsPerEm
record component.- Returns:
- the value of the
unitsPerEm
record component
-
ascent
-
descent
-
lineGap
-
underlinePosition
public float underlinePosition()Returns the value of theunderlinePosition
record component.- Returns:
- the value of the
underlinePosition
record component
-
underlineThickness
public float underlineThickness()Returns the value of theunderlineThickness
record component.- Returns:
- the value of the
underlineThickness
record component
-
capHeight
-
xHeight
-
boundingBox
Returns the value of theboundingBox
record component.- Returns:
- the value of the
boundingBox
record component
-