Font Support for Windows Phone のドキュメントアップデート

Font Support for Windows Phone

https://msdn.microsoft.com/en-us/library/hh202920(v=vs.92).aspx

Windows Phone で既定のアプリケーションテンプレートを使った場合に、日本語のフォントが正しく選択されない問題がありますが、対処方法が公式情報としてMSDNライブラリに公開されています。

こちら、WPDev Feedback Japan や米国本社チームとの調整によって対応されました。3月には完了していたのですが、皆様にお知らせするのが遅くなりました。ご協力ありがとうございました。

 

表示言語に応じた、適切なUI表示用フォントの自動選択

https://wpdev.uservoice.com/forums/136286-app-platform-japan/suggestions/2307195-%E8%A1%A8%E7%A4%BA%E8%A8%80%E8%AA%9E%E3%81%AB%E5%BF%9C%E3%81%98%E3%81%9F-%E9%81%A9%E5%88%87%E3%81%AAui%E8%A1%A8%E7%A4%BA%E7%94%A8%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AE%E8%87%AA%E5%8B%95%E9%81%B8%E6%8A%9E

 

MSDNに追加された内容

Fonts and Your Application


While developing your application, it is a good idea to design the application with both reading and UI fonts in mind, especially when dealing with East Asian languages. For example, since the Japanese reading font differs from the Japanese UI font, it's a good idea to test your application in both fonts. You can do this by changing the display language on the device or on the emulator, as described in the How to: Change the Region Settings for Windows Phone Emulator topic.

However, because of how fonts are loaded in XAML, it's important to explicitly add code that defines how the application should handle fonts.

  • If your application is localized for a specific East Asian language such as Japanese, and you want to ensure that the text displays in the expected font for that language, set the language on the outermost PhoneApplicationPage element of the XAML. For example: Language="ja-Jp".

  • Otherwise, add the following code to the constructor in App.xaml.cs:

    RootFrame.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentUICulture.Name);

    The above code will ensure that your text displays in the font that matches the user's current display language.