Font Support for Windows Phone

Windows Phone 

 from sdk for wp7

March 22, 2012

There are two types of fonts on a Windows Phone device:

  • Reading fonts

    These fonts are available on all Windows Phone devices to ensure that a user can read content from anywhere in the world, in any supported language.

  • UI fonts

    Each UI font is associated with a specific display language. Display languages are included with each phone depending on which market the phone was sold in. For example, a phone that is sold in Japan will likely have the Japanese display language included, while a phone that is sold in the United States will likely not have the Japanese display language included. Users can manually switch the display language on a device.

Content on the device is displayed using a corresponding reading font if a corresponding UI font is not available, depending on which display language is set.

For example, suppose a phone includes both a Japanese and English display language option, and the English display language is set on the device. If an application or UI element contains Japanese text, the Japanese reading font will be used to render the text, not the UI font, because the Japanese display language is not set.

For the full list of supported display languages, see Culture and Language Support for Windows Phone.

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.

If a font that you want to use in your application is unsupported, you can embed the font in your application.

Caution note Caution:

The East Asian language fonts listed in the Supported UI Fonts table are not redistributable for applications.

Windows Phone uses Unicode to represent characters. Develop your application with Unicode encoding to ensure that your application can run in a global context. You can use the Encoding class to convert encodings from one Unicode type to another Unicode type, for example, UTF-8 to UTF-16.

Characters without Encoding

Non-Unicode characters without encoding information are displayed according to the system locale setting on the phone. The system locale setting is set by the user and represents the default character set and font on the phone.

Yen and Won Characters - ¥ and ₩

The 'Reverse Solidus' Unicode character (U+005C) displays a Yen character in the Japanese display language, and a Won character in the Korean display language. However, because this character will render as a backslash in any other display language, use the 'Yen Sign' Unicode character (U+00A5) and the 'Won Sign' Unicode character (U+20A9) instead to ensure that they always render correctly.

WebBrowser Control

When using a WebBrowser control to display content, or when designing a website to be displayed on a Windows Phone, ensure that you include the correct encoding metadata information in your HTML.

In the following code example, many characters will not render accurately in the WebBrowser instance named BrowserControl, because the string is not correctly encoded.

 
string testString = "<html><body>日本列島の占領の最初の兆候が縄文時代で約14,000のBC。</body></html>";

BrowserControl.NavigateToString(testString);

Instead, include encoding information in the HTML content, as described in the following code example.

 
string testString = "<html><head><meta content=”text/html; charset=utf-16”/></head>
<body>日本列島の占領の最初の兆候が縄文時代で約14,000のBC。</body></html>";

BrowserControl.NavigateToString(testString);

The following table lists all UI fonts that are supported on a Windows Phone device. Availability of each font for a specific device depends on which display languages are included in the device.

Latin, Cyrillic, and Greek-based Languages

All Latin, Cyrillic, and Greek-based display languages use the UI font Segoe WP. This font is included on all phones, so even if a different display language such as Japanese is set, any Latin, Cyrillic, or Greek-based text will render using the Segoe WP UI font.

The following variations of the Segoe WP font are included on all Windows Phone devices:

  • Segoe WP Light

  • Segoe WP SemiLight

  • Segoe WP

  • Segoe WP Semibold

  • Segoe WP Bold

  • Segoe WP Black

East Asian Languages

 

Language

Font

Regular

Bold

Chinese (Simplified)

DengXian

green check mark green check mark

Chinese (Traditional)

Microsoft MHei

green check mark green check mark

Japanese

Yu Gothic

green check mark green check mark

Korean

Microsoft NeoGothic

green check mark green check mark

The following table lists all reading fonts that are supported on a Windows Phone device.

 

Font Name

Languages

Regular

Bold

Italic

Windows Phone OS 7.0

Windows Phone OS 7.1

Arial

Latin, Cyrillic, and Greek-based languages

green check mark green check mark green check mark green check mark green check mark

Arial Black

Latin, Cyrillic, and Greek-based languages

green check mark red x red x green check mark green check mark

Calibri

Latin, Cyrillic, and Greek-based languages

green check mark green check mark red x green check mark green check mark

Comic Sans MS

Latin, Cyrillic, and Greek-based languages

green check mark green check mark red x green check mark green check mark

Georgia

Latin, Cyrillic, and Greek-based languages

green check mark green check mark green check mark green check mark green check mark

Lucida Sans Unicode

Latin, Cyrillic, and Greek-based languages

green check mark red x red x green check mark green check mark

Malgun Gothic

Korean

green check mark red x red x green check mark green check mark

Meiryo UI

Japanese

green check mark red x red x green check mark green check mark

Microsoft YaHei

Chinese (Traditional), Chinese (Simplified)

green check mark red x red x green check mark green check mark

Segoe UI

Latin, Cyrillic, and Greek-based languages

green check mark green check mark red x green check mark green check mark

Segoe UI Symbol

Supports various Unicode symbols, including emoji symbols added in Unicode 6.0.

green check mark red x red x red x green check mark

SimSun

Chinese (Simplified)

Caution noteCaution:
This font is included only on devices that have the Chinese (Simplified) display language.
green check mark red x red x red x green check mark

Tahoma

Latin, Cyrillic, and Greek-based languages

green check mark green check mark red x green check mark green check mark

Times New Roman

Latin, Cyrillic, and Greek-based languages

green check mark green check mark green check mark green check mark green check mark

Trebuchet MS

Latin, Cyrillic, and Greek-based languages

green check mark green check mark green check mark green check mark green check mark

Verdana

Latin, Cyrillic, and Greek-based languages

green check mark green check mark green check mark green check mark green check mark
posted @ 2012-08-01 09:47  songtzu  阅读(498)  评论(0编辑  收藏  举报