FontMetrics

constructor(metrics: FloatArray)


constructor(top: Float, ascent: Float, descent: Float, bottom: Float, leading: Float, avgCharWidth: Float, maxCharWidth: Float, xMin: Float, xMax: Float, xHeight: Float, capHeight: Float, underlineThickness: Float?, underlinePosition: Float?, strikeoutThickness: Float?, strikeoutPosition: Float?)

Maintained for binary compatibility and previous construction with its named values

Parameters

top

greatest extent above origin of any glyph bounding box, typically negative; deprecated with variable fonts

ascent

distance to reserve above baseline, typically negative

descent

distance to reserve below baseline, typically positive

bottom

greatest extent below origin of any glyph bounding box, typically positive; deprecated with variable fonts

leading

distance to add between lines, typically positive or zero

avgCharWidth

average character width, zero if unknown

maxCharWidth

maximum character width, zero if unknown

xMin

greatest extent to left of origin of any glyph bounding box, typically negative; deprecated with variable fonts

xMax

greatest extent to right of origin of any glyph bounding box, typically positive; deprecated with variable fonts

xHeight

height of lower-case 'x', zero if unknown, typically negative

capHeight

height of an upper-case letter, zero if unknown, typically negative

underlineThickness

underline thickness

underlinePosition

distance from baseline to top of stroke, typically positive

strikeoutThickness

strikeout thickness

strikeoutPosition

distance from baseline to bottom of stroke, typically negative