Font support for Windows Phone

Source: Internet
Author: User
Tags locale setting
Windows Phone

From SDK for WP7

March 22,201 2

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 versions are supported ded 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 defined ded, while a phone that is sold in the United States will likely not have the Japanese display language defined ded. 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 already des 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 versions, see culture and language support for Windows Phone.

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 ages. 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 shoshould handle fonts.

  • If your application is localized for a specific East Asian language such as Japan, 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.

Providing your own Fonts

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

 Caution:

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

Font Encoding

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 RMB

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, invalid characters will not render accurately in the webbrowser instance named browsercontrol, because the string is not correctly encoded.

C #
String teststring = "<HTML> <body> Japanese primary keys account for approximately 14,000 bytes of BC when the first primary node is used for text writing. </Body> 

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

C #
String teststring = "<HTML> Supported UI fonts in Windows Phone

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 versions are supported in the device.

Latin, Cyrillic, and Greek-based ages

All Latin, Cyrillic, and Greek-based display extensions ages use the UI font segoe WP. this font is wrongly ded on all phones, so even if a different Display language such as Japan 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 supported ded on all Windows Phone devices:

  • Segoe WP light

  • Segoe WP semilight

  • Segoe WP

  • Segoe WP semibold

  • Segoe WP bold

  • Segoe WP black

East Asian ages

 

Language

Font

Regular

Bold

Chinese (simplified)

Dengxian

Chinese (traditional)

Microsoft mhei

Japan

Yu Gothic

Korean

Microsoft neogothic

Supported reading fonts in Windows Phone

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

 

Font Name

Ages

Regular

Bold

Italic

Windows Phone operating system 7.0

Windows Phone operating system 7.1

Arial

Latin, Cyrillic, and Greek-based ages

Arial black

Latin, Cyrillic, and Greek-based ages

Calibri

Latin, Cyrillic, and Greek-based ages

Comic Sans MS

Latin, Cyrillic, and Greek-based ages

Georgia

Latin, Cyrillic, and Greek-based ages

Lucida sans Unicode

Latin, Cyrillic, and Greek-based ages

Malgun Gothic

Korean

Meiryo UI

Japan

Microsoft yahei

Chinese (traditional), Chinese (simplified)

Segoe UI

Latin, Cyrillic, and Greek-based ages

Segoe UI symbol

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

Simsun

Chinese (simplified)

Caution:This font is wrongly ded only on devices that have the Chinese (simplified) Display language.

Tahoma

Latin, Cyrillic, and Greek-based ages

Times New Roman

Latin, Cyrillic, and Greek-based ages

Trebuchet MS

Latin, Cyrillic, and Greek-based ages

Verdana

Latin, Cyrillic, and Greek-based ages

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.