Struct TextMetrics
- Namespace
- Avalonia.Media.TextFormatting
- Assembly
- Avalonia.Base.dll
A metric that holds information about text specific measurements.
public readonly struct TextMetrics : IEquatable<TextMetrics>
- Implements
- Inherited Members
Constructors
TextMetrics(IGlyphTypeface, double)
public TextMetrics(IGlyphTypeface glyphTypeface, double fontRenderingEmSize)
Parameters
glyphTypeface
IGlyphTypefacefontRenderingEmSize
double
Properties
Ascent
Gets the recommended distance above the baseline.
public double Ascent { get; }
Property Value
Descent
Gets the recommended distance under the baseline.
public double Descent { get; }
Property Value
FontRenderingEmSize
Em size of font used to format and display text
public double FontRenderingEmSize { get; }
Property Value
LineGap
Gets the recommended additional space between two lines of text.
public double LineGap { get; }
Property Value
LineHeight
Gets the estimated line height.
public double LineHeight { get; }
Property Value
StrikethroughPosition
Gets a value that indicates the distance of the strikethrough from the baseline.
public double StrikethroughPosition { get; }
Property Value
StrikethroughThickness
Gets a value that indicates the thickness of the underline.
public double StrikethroughThickness { get; }
Property Value
UnderlinePosition
Gets a value that indicates the distance of the underline from the baseline.
public double UnderlinePosition { get; }
Property Value
UnderlineThickness
Gets a value that indicates the thickness of the underline.
public double UnderlineThickness { get; }
Property Value
Methods
Equals(TextMetrics)
public bool Equals(TextMetrics other)
Parameters
other
TextMetrics
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(TextMetrics, TextMetrics)
public static bool operator ==(TextMetrics left, TextMetrics right)
Parameters
left
TextMetricsright
TextMetrics
Returns
operator !=(TextMetrics, TextMetrics)
public static bool operator !=(TextMetrics left, TextMetrics right)
Parameters
left
TextMetricsright
TextMetrics