This sample demonstrates how to obtain language-specific font recommendations using the LanguageFontGroup class in the Windows.Globalization.Fonts namespace.
The LanguageFontGroup APIs (Windows.Globalization.Fonts namespace) can indicate an appropriate font to use for a given language. The caller is assumed to know the language, by whatever means; the API takes a language identifier tag and returns a recommended font. Scenarios in which this API is recommended are those that include text in multiple languages involving different character sets where a single font (even one specified in localized application resources) may not provide optimal results for all of the text. Two typical examples are:
- An app displays notifications from external sources that might be in different languages.
- A content-authoring app wants to pre-select recommended fonts that the user can choose in a font-picker control according to the input languages that the user has enabled.
To obtain an evaluation copy of Windows 8.1, go to Windows 8.1.
To obtain an evaluation copy of Microsoft Visual Studio 2013, go to Visual Studio 2013.
Note For Windows 8 app samples, download the Windows 8 app samples pack. The samples in the Windows 8 app samples pack will build and run only on Microsoft Visual Studio 2012.
Related topics
Operating system requirements
| Client | |
|---|---|
| Server |
Build the sample
- Start Visual Studio 2013 and select File > Open > Project/Solution.
- Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Microsoft Visual Studio Solution (.sln) file.
- Press F7 or use Build > Build Solution to build the sample.
Run the sample
To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.