Docsv2.12.12
Back to API Reference
Enum

TextOverEdge

Specifies which metric defines the top edge of the text box.

Remarks

Controls how the first line is positioned relative to the container top. Matches CSS text-box-edge over-edge values and Figma Vertical Trim.
public static readonly TextOverEdge Ascent = 0

Top edge at ascent line — default, fits all ascenders and diacritics.

public static readonly TextOverEdge CapHeight = 1

Top edge at cap height — tighter fit, matches Figma Vertical Trim.

public static readonly TextOverEdge HalfLeading = 2

Top edge includes half-leading — matches CSS and Figma Standard mode.

public static readonly TextOverEdge Text = 3

Top edge at the typographic ascent (OS/2 sTypo, CSS text-box-edge: text) — the designer's content-box top; the tight, browser-matched fit. Falls back to the ascent line when the font has no typo metrics.

public static readonly TextOverEdge XHeight = 4

Top edge at x-height (CSS text-box-edge: ex) — trims to the top of lowercase letters.