Skip to main content

TextMetrics Structure

A metric that holds information about text specific measurements.

Definition​

Namespace: Avalonia.Media.TextFormatting
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public readonly struct TextMetrics : IEquatable<TextMetrics>
View Source
InheritanceObject → ValueType → TextMetrics
ImplementsIEquatable(TextMetrics)

Constructors​

TextMetrics(IGlyphTypeface, Double)Initializes a new instance of the TextMetrics class

Properties​

AscentGets the recommended distance above the baseline.
BaselineGets the distance from the top to the baseline of the line of text.
DescentGets the recommended distance under the baseline.
FontRenderingEmSizeEm size of font used to format and display text
LineGapGets the recommended additional space between two lines of text.
LineHeightGets the estimated line height.
StrikethroughPositionGets a value that indicates the distance of the strikethrough from the baseline.
StrikethroughThicknessGets a value that indicates the thickness of the underline.
UnderlinePositionGets a value that indicates the distance of the underline from the baseline.
UnderlineThicknessGets a value that indicates the thickness of the underline.

Methods​

GetType()Gets the Type of the current instance.
(Inherited from Object)

See Also​

Reference​

Avalonia.Media.TextFormatting Namespace