Windows Phone 7 Development Tutorial (4)--xna Display Chinese fonts

Source: Internet
Author: User

I've been incredibly diligent lately. Yesterday, a friend in the last article comments, criticized Windows Phone 7 temporarily does not support the Chinese version of the issue. There is a process in everything, before the Chinese version comes out, let's think about something. Silverlight for Windows phone is over there, and somebody's going to figure it out. How do I get Windows Phone 7 games to display Chinese? Drag the guy who said "map" out and kill him! Because the XNA 4.0 support Chinese method is ready-made, this has a lot to do with the way that XNA font supports.

Sample code Download Address:

Http://files.cnblogs.com/aawolf/XNA_aawolf_SIP_Chinese.rar

Drawing fonts

Let's take a look at how the font is drawn in XNA and the description on MSDN is good:

Http://msdn.microsoft.com/en-us/library/bb447673.aspx

On the issue of font licensing we don't have to tangle, to remind you, to use a font before the first confirm that you can use, redistribute. The first step in drawing a font is to create a sprite font font. The font file used in XNA is called Sprite font, and the file name extension is. SPRITEFONT,XNA supports converting fonts to. Spritefont from. ttf.

First, we found the Windowsphonegame1content project in the VS 2010 Solution Explorer, right-click on "Add"-"New Folder", name the new folders font, and right-click on the font, Select "Add"-"New Item", and then select Create "Sprite font" in the dialog box to name the font file Startfont.

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.