Struct Typeface
Represents a typeface.
public readonly struct Typeface : IEquatable<Typeface>
- Implements
- Inherited Members
Constructors
Typeface(FontFamily, FontStyle, FontWeight, FontStretch)
Initializes a new instance of the Typeface class.
public Typeface(FontFamily fontFamily, FontStyle style = FontStyle.Normal, FontWeight weight = FontWeight.Normal, FontStretch stretch = FontStretch.Normal)
Parameters
fontFamily
FontFamilyThe font family.
style
FontStyleThe font style.
weight
FontWeightThe font weight.
stretch
FontStretchThe font stretch.
Typeface(string, FontStyle, FontWeight, FontStretch)
Initializes a new instance of the Typeface class.
public Typeface(string fontFamilyName, FontStyle style = FontStyle.Normal, FontWeight weight = FontWeight.Normal, FontStretch stretch = FontStretch.Normal)
Parameters
fontFamilyName
stringThe name of the font family.
style
FontStyleThe font style.
weight
FontWeightThe font weight.
stretch
FontStretchThe font stretch.
Properties
Default
public static Typeface Default { get; }
Property Value
FontFamily
Gets the font family.
public FontFamily FontFamily { get; }
Property Value
GlyphTypeface
Gets the glyph typeface.
public IGlyphTypeface GlyphTypeface { get; }
Property Value
- IGlyphTypeface
The glyph typeface.
Stretch
Gets the font stretch.
public FontStretch Stretch { get; }
Property Value
Style
Gets the font style.
public FontStyle Style { get; }
Property Value
Weight
Gets the font weight.
public FontWeight Weight { get; }
Property Value
Methods
Equals(Typeface)
public bool Equals(Typeface other)
Parameters
other
Typeface
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(Typeface, Typeface)
public static bool operator ==(Typeface a, Typeface b)
Parameters
Returns
operator !=(Typeface, Typeface)
public static bool operator !=(Typeface a, Typeface b)