LanguageFontGroup class
Supplies a set of font recommendations for a given language or script for various usage cases.
Syntax
var languageFontGroup = new Windows.Globalization.Fonts.LanguageFontGroup();
Attributes
- ActivatableAttribute(Windows.Globalization.Fonts.ILanguageFontGroupFactory, NTDDI_WIN8)
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(MTA)
- VersionAttribute(NTDDI_WIN8)
Members
The LanguageFontGroup class has these types of members:
Constructors
The LanguageFontGroup class has these constructors.
| Constructor | Description |
|---|---|
| LanguageFontGroup | Creates a LanguageFontGroup object for a given language or script. |
Methods
The LanguageFontGroup class inherits methods from the Object class (C#/VB/C++).
Properties
The LanguageFontGroup class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets a font that is recommended as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont. | |
| Read-only | Gets a font that is recommended as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont. | |
| Read-only | Gets a font that is recommended for use in document headings. | |
| Read-only | Gets a font that is recommended for displaying fixed-width characters. | |
| Read-only | Gets a font that is recommended for typical document body text following modern style conventions. | |
| Read-only | Gets a font that is recommended for typical document body text following traditional style conventions. | |
| Read-only | Gets a font that is recommended for special UI elements, such as captions, that are displayed at sizes smaller than typical UI body text. | |
| Read-only | Gets a font that is recommended for special UI elements, such as headings, that are displayed at sizes somewhat larger than typical UI body text. | |
| Read-only | Gets a font that is recommended for special UI elements, such as headings in notifications or other app messages, that are displayed at UIbody text size or only slightly larger yet need to be differentiated from UI body text. | |
| Read-only | Gets a font that is recommended for typical UI body text. | |
| Read-only | Gets a font that is recommended for special UI elements set at sizes much larger than typical UI body text. |
Remarks
A LanguageFontGroup provides a set of font recommendations for a particular language or script. The different fonts recommended by a given LanguageFontGroup, exposed as separate LanguageFontGroup properties, correspond to different usage cases.
Each LanguageFontGroup property returns a LanguageFont object, which provides the details for that particular font recommendation. Those details include a font family as well as font weight, style and stretch attributes.
The weight/style/stretch attributes are significant for some usage cases but not others. For instance, the font recommendations for the various UI usage categories may use fonts from the same font family but differ in weight (for example, Segoe UI Semilight for UITextFont, but Segoe UI Regular for UICaptionFont). But for some usage cases, the weight/style/stretch attributes might always indicate a "regular" font (regular weight, normal style, normal stretch). In those cases, apps might want to apply other weight/style/stretch formatting as may be appropriate for the app scenario. See the remarks for each LanguageFontGroup property for additional information.
For some languages and scripts, the LanguageFontGroup may not provide a font recommendation for every usage case. For instance, fixed-width fonts are not provided in Windows for every script. See the remarks for each LanguageFontGroup property for additional information.
Note If your app passes language tags used in this class to any National Language Support functions, it must first convert the tags by calling ResolveLocaleName.
Examples
// Get the recommended Japanese fonts for traditional documents and modern documents. var fonts = new Windows.Globalization.Fonts.LanguageFontGroup('ja-JP'); var traditionalDocumentFont = fonts.traditionalDocumentFont; var modernDocumentFont = fonts.modernDocumentFont; // Obtain two properties of the traditional document font. var traditionalDocumentFontFontFamily = traditionalDocumentFont.fontFamily; // "MS Mincho" var traditionalDocumentFontScaleFactor = traditionalDocumentFont.scaleFactor; // 100 // Obtain two properties of the modern document font. var modernDocumentFontFontFamily = modernDocumentFont.fontFamily; // "Meiryo" var modernDocumentFontScaleFactor = modernDocumentFont.scaleFactor; // 90
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps, desktop apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps, desktop apps] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
