Typeface(String, FontStyle, FontWeight, FontStretch) Constructor
Initializes a new instance of the Typeface class.
Definition
Namespace: Avalonia.Media
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public Typeface(
string fontFamilyName,
FontStyle style = FontStyle.Normal,
FontWeight weight = FontWeight.Normal,
FontStretch stretch = FontStretch.Normal
)
Public Sub New (
fontFamilyName As String,
Optional style As FontStyle = FontStyle.Normal,
Optional weight As FontWeight = FontWeight.Normal,
Optional stretch As FontStretch = FontStretch.Normal
)
new :
fontFamilyName : string *
?style : FontStyle *
?weight : FontWeight *
?stretch : FontStretch
(* Defaults:
let _style = defaultArg style FontStyle.Normal
let _weight = defaultArg weight FontWeight.Normal
let _stretch = defaultArg stretch FontStretch.Normal
*)
-> Typeface
Parameters
- String
- The name of the font family.
- FontStyle (Optional)
- The font style.
- FontWeight (Optional)
- The font weight.
- FontStretch (Optional)
- The font stretch.
See Also
Reference
Typeface Structure
Typeface Overload
Avalonia.Media Namespace