Package io.github.humbleui.skija
Class FontMetrics
- java.lang.Object
-
- io.github.humbleui.skija.FontMetrics
-
public class FontMetrics extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description float_ascentdistance to reserve above baseline, typically negativefloat_avgCharWidthaverage character width, zero if unknownfloat_bottomgreatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fontsfloat_capHeightheight of an upper-case letter, zero if unknown, typically negativefloat_descentdistance to reserve below baseline, typically positivefloat_leadingdistance to add between lines, typically positive or zerofloat_maxCharWidthmaximum character width, zero if unknown@Nullable java.lang.Float_strikeoutPositiondistance from baseline to bottom of stroke, typically negative@Nullable java.lang.Float_strikeoutThicknessstrikeout thicknessfloat_topgreatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts@Nullable java.lang.Float_underlinePositiondistance from baseline to top of stroke, typically positive@Nullable java.lang.Float_underlineThicknessunderline thicknessfloat_xHeightheight of lower-case 'x', zero if unknown, typically negativefloat_xMaxgreatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fontsfloat_xMingreatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
-
Constructor Summary
Constructors Constructor Description FontMetrics(float top, float ascent, float descent, float bottom, float leading, float avgCharWidth, float maxCharWidth, float xMin, float xMax, float xHeight, float capHeight, @Nullable java.lang.Float underlineThickness, @Nullable java.lang.Float underlinePosition, @Nullable java.lang.Float strikeoutThickness, @Nullable java.lang.Float strikeoutPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)floatgetAscent()distance to reserve above baseline, typically negativefloatgetAvgCharWidth()average character width, zero if unknownfloatgetBottom()greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fontsfloatgetCapHeight()height of an upper-case letter, zero if unknown, typically negativefloatgetDescent()distance to reserve below baseline, typically positivefloatgetHeight()floatgetLeading()distance to add between lines, typically positive or zerofloatgetMaxCharWidth()maximum character width, zero if unknown@Nullable java.lang.FloatgetStrikeoutPosition()distance from baseline to bottom of stroke, typically negative@Nullable java.lang.FloatgetStrikeoutThickness()strikeout thicknessfloatgetTop()greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts@Nullable java.lang.FloatgetUnderlinePosition()distance from baseline to top of stroke, typically positive@Nullable java.lang.FloatgetUnderlineThickness()underline thicknessfloatgetXHeight()height of lower-case 'x', zero if unknown, typically negativefloatgetXMax()greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fontsfloatgetXMin()greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fontsinthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
_top
public final float _top
greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts
-
_ascent
public final float _ascent
distance to reserve above baseline, typically negative
-
_descent
public final float _descent
distance to reserve below baseline, typically positive
-
_bottom
public final float _bottom
greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts
-
_leading
public final float _leading
distance to add between lines, typically positive or zero
-
_avgCharWidth
public final float _avgCharWidth
average character width, zero if unknown
-
_maxCharWidth
public final float _maxCharWidth
maximum character width, zero if unknown
-
_xMin
public final float _xMin
greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
-
_xMax
public final float _xMax
greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts
-
_xHeight
public final float _xHeight
height of lower-case 'x', zero if unknown, typically negative
-
_capHeight
public final float _capHeight
height of an upper-case letter, zero if unknown, typically negative
-
_underlineThickness
@Nullable public final @Nullable java.lang.Float _underlineThickness
underline thickness
-
_underlinePosition
@Nullable public final @Nullable java.lang.Float _underlinePosition
distance from baseline to top of stroke, typically positive
-
_strikeoutThickness
@Nullable public final @Nullable java.lang.Float _strikeoutThickness
strikeout thickness
-
_strikeoutPosition
@Nullable public final @Nullable java.lang.Float _strikeoutPosition
distance from baseline to bottom of stroke, typically negative
-
-
Constructor Detail
-
FontMetrics
public FontMetrics(float top, float ascent, float descent, float bottom, float leading, float avgCharWidth, float maxCharWidth, float xMin, float xMax, float xHeight, float capHeight, @Nullable @Nullable java.lang.Float underlineThickness, @Nullable @Nullable java.lang.Float underlinePosition, @Nullable @Nullable java.lang.Float strikeoutThickness, @Nullable @Nullable java.lang.Float strikeoutPosition)
-
-
Method Detail
-
getHeight
public float getHeight()
-
getTop
public float getTop()
greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts
-
getAscent
public float getAscent()
distance to reserve above baseline, typically negative
-
getDescent
public float getDescent()
distance to reserve below baseline, typically positive
-
getBottom
public float getBottom()
greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts
-
getLeading
public float getLeading()
distance to add between lines, typically positive or zero
-
getAvgCharWidth
public float getAvgCharWidth()
average character width, zero if unknown
-
getMaxCharWidth
public float getMaxCharWidth()
maximum character width, zero if unknown
-
getXMin
public float getXMin()
greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts
-
getXMax
public float getXMax()
greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts
-
getXHeight
public float getXHeight()
height of lower-case 'x', zero if unknown, typically negative
-
getCapHeight
public float getCapHeight()
height of an upper-case letter, zero if unknown, typically negative
-
getUnderlineThickness
@Nullable public @Nullable java.lang.Float getUnderlineThickness()
underline thickness
-
getUnderlinePosition
@Nullable public @Nullable java.lang.Float getUnderlinePosition()
distance from baseline to top of stroke, typically positive
-
getStrikeoutThickness
@Nullable public @Nullable java.lang.Float getStrikeoutThickness()
strikeout thickness
-
getStrikeoutPosition
@Nullable public @Nullable java.lang.Float getStrikeoutPosition()
distance from baseline to bottom of stroke, typically negative
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-