Skip to main content

FontCollectionKey Struct

Definition

Assembly:Avalonia.Base
Package:Avalonia

Represents a unique key for identifying a font inside a font collection based on style, weight, and stretch attributes.

public struct FontCollectionKey

Inheritance: ValueType -> FontCollectionKey

Implements: IEquatable<FontCollectionKey>

Remarks

Use this key to efficiently look up or group fonts in a collection by their style, weight, and stretch characteristics.

Constructors

NameDescription
FontCollectionKeyRepresents a unique key for identifying a font inside a font collection based on style, weight, and stretch attributes.

FontCollectionKey Constructor

Represents a unique key for identifying a font inside a font collection based on style, weight, and stretch attributes.

public FontCollectionKey(Avalonia.Media.FontStyle Style, Avalonia.Media.FontWeight Weight, Avalonia.Media.FontStretch Stretch)

Parameters

Style Avalonia.Media.FontStyle

The font style to use when constructing the key.

Weight Avalonia.Media.FontWeight

The font weight to use when constructing the key.

Stretch Avalonia.Media.FontStretch

The font stretch to use when constructing the key.

Remarks

Use this key to efficiently look up or group fonts in a collection by their style, weight, and stretch characteristics.

Methods

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

Deconstruct Method

public void Deconstruct(Avalonia.Media.FontStyle& Style, Avalonia.Media.FontWeight& Weight, Avalonia.Media.FontStretch& Stretch)

Parameters

Style Avalonia.Media.FontStyle&

Weight Avalonia.Media.FontWeight&

Stretch Avalonia.Media.FontStretch&

Equals overloads

Equals Method

public bool Equals(Avalonia.Media.Fonts.FontCollectionKey other)
Parameters

other Avalonia.Media.Fonts.FontCollectionKey

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
StretchThe font stretch to use when constructing the key.
StyleThe font style to use when constructing the key.
WeightThe font weight to use when constructing the key.

Stretch Property

The font stretch to use when constructing the key.

public Avalonia.Media.FontStretch Stretch { get; set; }

Style Property

The font style to use when constructing the key.

public Avalonia.Media.FontStyle Style { get; set; }

Weight Property

The font weight to use when constructing the key.

public Avalonia.Media.FontWeight Weight { get; set; }