FontFamily
FontFamily
FontFamily
FontFamily
Class
Definition
Represents a family of related fonts.
public : class FontFamily : IFontFamilypublic class FontFamily : IFontFamilyPublic Class FontFamily Implements IFontFamily// This API is not available in Javascript.
<FontFamily>fontFamilyName[,fallbackFontFamilyName]*</FontFamily>
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
FontFamily(String) FontFamily(String) FontFamily(String) FontFamily(String)
Initializes a new instance of the FontFamily class from the specified font family string.
public : FontFamily(PlatForm::String familyName)public FontFamily(String familyName)Public Sub New(familyName As String)// This API is not available in Javascript.
Parameters
- familyName
- PlatForm::String String String String
The family name of the font to represent. This can include a hashed suffix.
Properties
Source Source Source Source
Gets the font family name that is used to construct the FontFamily object.
public : PlatForm::String Source { get; }public string Source { get; }Public ReadOnly Property Source As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
The font family name of the FontFamily object.
XamlAutoFontFamily XamlAutoFontFamily XamlAutoFontFamily XamlAutoFontFamily
Gets the default font family based on an app's language settings.
public : static FontFamily XamlAutoFontFamily { get; }public static FontFamily XamlAutoFontFamily { get; }Public Static ReadOnly Property XamlAutoFontFamily As FontFamily// This API is not available in Javascript.
The default font family based on an app's language settings. See Remarks.
Additional features and requirements
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Examples
<TextBlock FontFamily="XamlAutoFontFamily"/>
TextBlock textBlock1 = new TextBlock();
textBlock1.FontFamily = FontFamily.XamlAutoFontFamily;
Remarks
XamlAutoFontFamily is the default FontFamily property setting for all XAML controls. The FontFamily that this property gets at run time depends on the app language.
| Language | Default FontFamily |
|---|---|
| Japanese | Yu Gothic UI |
| Korean | Malgun Gothic |
| All others | Segoe UI |