Table of Contents

Struct LineMetrics

Namespace
SixLabors.Fonts
Assembly
SixLabors.Fonts.dll

Encapsulates measured metrics for a single laid-out text line.

public readonly struct LineMetrics
Inherited Members

Properties

Ascender

Gets the ascender line position within the line box.

public float Ascender { get; }

Property Value

float

Remarks

This is a position value (not a baseline-relative distance). Use this value to draw the ascender guide line relative to the current line origin.

Baseline

Gets the baseline position within the line box.

public float Baseline { get; }

Property Value

float

Remarks

Use this value as the guide-line position for drawing a baseline relative to the current line origin.

Descender

Gets the descender line position within the line box.

public float Descender { get; }

Property Value

float

Remarks

This is a position value (not a baseline-relative distance). Use this value to draw the descender guide line relative to the current line origin.

Extent

Gets the logical line box extent in pixel units.

public Vector2 Extent { get; }

Property Value

Vector2

GraphemeCount

Gets the number of graphemes in the line.

public int GraphemeCount { get; }

Property Value

int

GraphemeIndex

Gets the zero-based grapheme index in the original text.

public int GraphemeIndex { get; }

Property Value

int

LineHeight

Gets the total line-box size for this line.

public float LineHeight { get; }

Property Value

float

Start

Gets the logical line box start position in pixel units.

public Vector2 Start { get; }

Property Value

Vector2

StringIndex

Gets the zero-based UTF-16 code unit index in the original text.

public int StringIndex { get; }

Property Value

int