Skip to main content

FontMetrics Struct

Definition

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia

The font metrics is holding information about a font's ascent, descent, etc. in design em units.

public struct FontMetrics

Inheritance: ValueType -> FontMetrics

Implements: IEquatable<FontMetrics>

Methods

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.FontMetrics other)
Parameters

other Avalonia.Media.FontMetrics

Returns

bool

Equals Method

public bool Equals(object obj)
Parameters

obj object

Returns

bool

GetHashCode Method

public int GetHashCode()

Returns

int

ToString Method

public string ToString()

Returns

string

Properties

NameDescription
AscentGets the recommended distance above the baseline in design em size.
DescentGets the recommended distance under the baseline in design em size.
DesignEmHeightGets the font design units per em.
IsFixedPitchA bool value indicating whether all glyphs in the font have the same advancement.
LineGapGets the recommended additional space between two lines of text in design em size.
LineSpacingGets the recommended line spacing of a formed text line.
StrikethroughPositionGets a value that indicates the distance of the strikethrough from the baseline in design em size.
StrikethroughThicknessGets a value that indicates the thickness of the underline in design em size.
UnderlinePositionGets a value that indicates the distance of the underline from the baseline in design em size.
UnderlineThicknessGets a value that indicates the thickness of the underline in design em size.

Ascent Property

Gets the recommended distance above the baseline in design em size.

public int Ascent { get; set; }

Descent Property

Gets the recommended distance under the baseline in design em size.

public int Descent { get; set; }

DesignEmHeight Property

Gets the font design units per em.

public ushort DesignEmHeight { get; set; }

IsFixedPitch Property

A bool value indicating whether all glyphs in the font have the same advancement.

public bool IsFixedPitch { get; set; }

LineGap Property

Gets the recommended additional space between two lines of text in design em size.

public int LineGap { get; set; }

LineSpacing Property

Gets the recommended line spacing of a formed text line.

public int LineSpacing { get; set; }

StrikethroughPosition Property

Gets a value that indicates the distance of the strikethrough from the baseline in design em size.

public int StrikethroughPosition { get; set; }

StrikethroughThickness Property

Gets a value that indicates the thickness of the underline in design em size.

public int StrikethroughThickness { get; set; }

UnderlinePosition Property

Gets a value that indicates the distance of the underline from the baseline in design em size.

public int UnderlinePosition { get; set; }

UnderlineThickness Property

Gets a value that indicates the thickness of the underline in design em size.

public int UnderlineThickness { get; set; }