Struct LineMetrics
Represents text layout metrics that depend on the specific string being measured. Includes actual bounding box and visual advance width.
public readonly struct LineMetrics
- Inherited Members
Constructors
LineMetrics(NFloat, NFloat, NFloat, NFloat, NFloat)
Initializes a new LineMetrics instance.
public LineMetrics(NFloat width, NFloat left, NFloat right, NFloat ascent, NFloat descent)
Parameters
width
NFloatAdvance width of the rendered text.
left
NFloatFurthest left pixel offset relative to the origin.
right
NFloatFurthest right pixel offset relative to the origin.
ascent
NFloatMaximum pixel height above the baseline.
descent
NFloatMaximum pixel depth below the baseline.
Fields
ActualBoundingBoxAscent
Distance from the baseline to the topmost pixel of any glyph.
public readonly NFloat ActualBoundingBoxAscent
Field Value
ActualBoundingBoxDescent
Distance from the baseline to the bottommost pixel of any glyph.
public readonly NFloat ActualBoundingBoxDescent
Field Value
ActualBoundingBoxLeft
Distance from the text origin to the furthest left pixel of any glyph. May be negative for italic or overhanging glyphs.
public readonly NFloat ActualBoundingBoxLeft
Field Value
ActualBoundingBoxRight
Distance from the text origin to the furthest right pixel of any glyph.
public readonly NFloat ActualBoundingBoxRight
Field Value
Width
Advance width of the string, including kerning and shaping. This is how far the cursor should advance after drawing the text.
public readonly NFloat Width
Field Value
Properties
ActualHeight
Full height of the visual bounding box (ascent + descent).
public NFloat ActualHeight { get; }