Windows 10 requirements
Device family |
Windows 10 (introduced v10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
// 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;
更多参考:
https://docs.microsoft.com/en-us/uwp/api/Windows.Globalization.Fonts.LanguageFont