Skip to main content

Typeface Struct

Definition​

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

Represents a typeface.

public struct Typeface

Inheritance: ValueType -> Typeface

Implements: IEquatable<Typeface>

Constructors​

NameDescription
Typeface (2 overloads)Initializes a new instance of the Avalonia.Media.Typeface class.

Typeface overloads​

Typeface Constructor​

Initializes a new instance of the Avalonia.Media.Typeface class.

public Typeface(Avalonia.Media.FontFamily fontFamily, Avalonia.Media.FontStyle style, Avalonia.Media.FontWeight weight, Avalonia.Media.FontStretch stretch)
Parameters​

fontFamily Avalonia.Media.FontFamily

The font family.

style Avalonia.Media.FontStyle

The font style.

weight Avalonia.Media.FontWeight

The font weight.

stretch Avalonia.Media.FontStretch

The font stretch.

Typeface Constructor​

Initializes a new instance of the Avalonia.Media.Typeface class.

public Typeface(string fontFamilyName, Avalonia.Media.FontStyle style, Avalonia.Media.FontWeight weight, Avalonia.Media.FontStretch stretch)
Parameters​

fontFamilyName string

The name of the font family.

style Avalonia.Media.FontStyle

The font style.

weight Avalonia.Media.FontWeight

The font weight.

stretch Avalonia.Media.FontStretch

The font stretch.

Methods​

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

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Media.Typeface other)
Parameters​

other Avalonia.Media.Typeface

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

Normalize Method​

public Avalonia.Media.Typeface Normalize(string& normalizedFamilyName)

Parameters​

normalizedFamilyName string&

Returns​

Avalonia.Media.Typeface

Properties​

NameDescription
DefaultNo summary available.
FontFamilyGets the font family.
GlyphTypefaceGets the glyph typeface.
StretchGets the font stretch.
StyleGets the font style.
WeightGets the font weight.

Default Property​

public Avalonia.Media.Typeface Default { get; set; }

FontFamily Property​

Gets the font family.

public Avalonia.Media.FontFamily FontFamily { get; set; }

GlyphTypeface Property​

Gets the glyph typeface.

public Avalonia.Media.GlyphTypeface GlyphTypeface { get; set; }

Value​

The glyph typeface.

Stretch Property​

Gets the font stretch.

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

Style Property​

Gets the font style.

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

Weight Property​

Gets the font weight.

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