Language​Font​Group Language​Font​Group Language​Font​Group Class

Definition

Supplies a set of font recommendations for a given language or script for various usage cases.

public : sealed class LanguageFontGroup : ILanguageFontGrouppublic sealed class LanguageFontGroup : ILanguageFontGroupPublic NotInheritable Class LanguageFontGroup Implements ILanguageFontGroup
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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
// 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

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.

Beginning in : The LanguageFontGroup class returns font group data to match the target operating system for which an app was developed. Therefore, if you update your Windows 8 app to Windows 8.1, the fonts used in your app may change, and you may need to make adjustments to your UI layout.

Constructors

LanguageFontGroup(String) LanguageFontGroup(String) LanguageFontGroup(String)

Creates a LanguageFontGroup object for a given language or script.

public : LanguageFontGroup(PlatForm::String languageTag)public LanguageFontGroup(String languageTag)Public Sub New(languageTag As String)
Parameters
languageTag
PlatForm::String String String

A BCP-47 language tag, or an ISO 15924 script identifier.

Attributes

Remarks

The languageTag parameter can be any valid BCP-47 language tag, such as "en", "de-CH", or "zh-Hans". The only limitations are that the language tag must include an explicit script subtag or be for a language for which the script is implicitly known. (For instance, "en" is assumed to imply Latin script.) Moreover, the script must be one that Windows supports.

The languageTag parameter can also be a valid ISO 15924 script identifier, such as "Latn", "Cyrl", or "Deva". The only limitation is that the script must be one that Windows supports.

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.

See Also

Properties

DocumentAlternate1Font DocumentAlternate1Font DocumentAlternate1Font

Gets a font that is recommended as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont.

public : LanguageFont DocumentAlternate1Font { get; }public LanguageFont DocumentAlternate1Font { get; }Public ReadOnly Property DocumentAlternate1Font As LanguageFont
Value
LanguageFont LanguageFont LanguageFont

The recommended LanguageFont, or NULL if no font recommendation is available.

Attributes

Remarks

The DocumentAlternate1Font property provides a font recommendation as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont. These fonts could be used in body text or other text elements. The app scenario for which this is most likely to be useful is in populating a font-picker list in an authoring tool with a set of fonts designed for a particular language or script.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A DocumentAlternate1Font recommendation is available for certain languages and scripts only.

DocumentAlternate2Font DocumentAlternate2Font DocumentAlternate2Font

Gets a font that is recommended as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont.

public : LanguageFont DocumentAlternate2Font { get; }public LanguageFont DocumentAlternate2Font { get; }Public ReadOnly Property DocumentAlternate2Font As LanguageFont
Value
LanguageFont LanguageFont LanguageFont

The recommended LanguageFont, or NULL if no font recommendation is available.

Attributes

Remarks

The DocumentAlternate2Font property provides a font recommendation as an additional option for use in documents beyond the recommendations provided by DocumentHeadingFont, ModernDocumentFont and TraditionalDocumentFont. These fonts could be used in body text or other text elements. The app scenario for which this is most likely to be useful is in populating a font-picker list in an authoring tool with a set of fonts designed for a particular language or script.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A DocumentAlternate2Font recommendation is available for certain languages and scripts only.

DocumentHeadingFont DocumentHeadingFont DocumentHeadingFont

Gets a font that is recommended for use in document headings.

public : LanguageFont DocumentHeadingFont { get; }public LanguageFont DocumentHeadingFont { get; }Public ReadOnly Property DocumentHeadingFont As LanguageFont
Attributes

Remarks

The DocumentHeadingFont property provides a font recommendation for document text elements such as headings. These fonts could also be used in body text, but use for long runs of body text is not generally recommended. The recommended font may be a display face that is significantly different from the ModernDocumentFont and TraditionalDocumentFont recommendations.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A DocumentHeadingFont recommendation is available for every supported language or script.

FixedWidthTextFont FixedWidthTextFont FixedWidthTextFont

Gets a font that is recommended for displaying fixed-width characters.

public : LanguageFont FixedWidthTextFont { get; }public LanguageFont FixedWidthTextFont { get; }Public ReadOnly Property FixedWidthTextFont As LanguageFont
Value
LanguageFont LanguageFont LanguageFont

The recommended LanguageFont, or NULL if no font recommendation is available.

Attributes

Remarks

The FixedWidthTextFont property provides a font recommendation for displaying fixed-width characters.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A FixedWidthTextFont recommendation is available for certain languages and scripts only.

ModernDocumentFont ModernDocumentFont ModernDocumentFont

Gets a font that is recommended for typical document body text following modern style conventions.

public : LanguageFont ModernDocumentFont { get; }public LanguageFont ModernDocumentFont { get; }Public ReadOnly Property ModernDocumentFont As LanguageFont
Attributes

Remarks

The ModernDocumentFont property provides a font recommendation for typical document body text following modern style conventions. These fonts can also be used in headings or other document elements.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A ModernDocumentFont recommendation is available for every supported language or script.

TraditionalDocumentFont TraditionalDocumentFont TraditionalDocumentFont

Gets a font that is recommended for typical document body text following traditional style conventions.

public : LanguageFont TraditionalDocumentFont { get; }public LanguageFont TraditionalDocumentFont { get; }Public ReadOnly Property TraditionalDocumentFont As LanguageFont
Attributes

Remarks

The TraditionalDocumentFont property provides a font recommendation for typical document body text following traditional styling conventions. These fonts can also be used in headings or other document elements.

The font recommended for this usage case will always be a "regular" font (regular weight, normal style, normal stretch). Apps might want to apply other weight/style/stretch formatting, as may be appropriate for the app scenario.

A TraditionalDocumentFont recommendation is available for every supported language or script.

UICaptionFont UICaptionFont UICaptionFont

Gets a font that is recommended for special UI elements, such as captions, that are displayed at sizes smaller than typical UI body text.

public : LanguageFont UICaptionFont { get; }public LanguageFont UICaptionFont { get; }Public ReadOnly Property UICaptionFont As LanguageFont
Attributes

Remarks

The UICaptionFont property provides a font recommendation for special UI elements, such as captions, that are displayed at sizes smaller than typical UI body text.

The font recommended for this usage case may be differentiated from other UI usage cases in font weight, style or stretch values. Those attributes are significant aspects of the font recommendation being provided.

A UICaptionFont recommendation is available for every supported language or script.

See Also

UIHeadingFont UIHeadingFont UIHeadingFont

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.

public : LanguageFont UIHeadingFont { get; }public LanguageFont UIHeadingFont { get; }Public ReadOnly Property UIHeadingFont As LanguageFont
Attributes

Remarks

The UIHeadingFont property provides a font recommendation for special UI elements, such as headings, that are displayed at sizes somewhat larger than typical UI body text.

The font recommended for this usage case may be differentiated from other UI usage cases in font weight, style or stretch values. Those attributes are significant aspects of the font recommendation being provided.

A UIHeadingFont recommendation is available for every supported language or script.

See Also

UINotificationHeadingFont UINotificationHeadingFont UINotificationHeadingFont

Gets a font that is recommended for special UI elements, such as headings in notifications or other app messages, that are displayed at UI body text size or only slightly larger yet need to be differentiated from UI body text.

public : LanguageFont UINotificationHeadingFont { get; }public LanguageFont UINotificationHeadingFont { get; }Public ReadOnly Property UINotificationHeadingFont As LanguageFont
Attributes

Remarks

The UINotificationHeadingFont property provides a font recommendation for special UI elements, such as headings in notifications or other app messages, that are displayed at UI body text size or only slightly larger yet need to be differentiated from UI body text.

The font recommended for this usage case may be differentiated from other UI usage cases in font weight, style or stretch values. Those attributes are significant aspects of the font recommendation being provided.

A UINotificationHeadingFont recommendation is available for every supported language or script.

See Also

UITextFont UITextFont UITextFont

Gets a font that is recommended for typical UI body text.

public : LanguageFont UITextFont { get; }public LanguageFont UITextFont { get; }Public ReadOnly Property UITextFont As LanguageFont
Attributes

Remarks

The UITextFont property provides a font recommendation for typical UI body text.

The font recommended for this usage case may be differentiated from other UI usage cases in font weight, style or stretch values. Those attributes are significant aspects of the font recommendation being provided.

A UITextFont recommendation is available for every supported language or script.

See Also

UITitleFont UITitleFont UITitleFont

Gets a font that is recommended for special UI elements set at sizes much larger than typical UI body text.

public : LanguageFont UITitleFont { get; }public LanguageFont UITitleFont { get; }Public ReadOnly Property UITitleFont As LanguageFont
Attributes

Remarks

The UITitleFont property provides a font recommendation for special UI elements set at sizes much larger than typical UI body text—typically 36 pt. or above.

The font recommended for this usage case may be differentiated from other UI usage cases in font weight, style or stretch values. Those attributes are significant aspects of the font recommendation being provided.

A UITitleFont recommendation is available for every supported language or script.

See Also

See Also