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
widthNFloatAdvance width of the rendered text.
leftNFloatFurthest left pixel offset relative to the origin.
rightNFloatFurthest right pixel offset relative to the origin.
ascentNFloatMaximum pixel height above the baseline.
descentNFloatMaximum 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; }