在XNA游戏中为WP7使用亚洲字符 [英] Using asian characters in XNA games for WP7

查看:86
本文介绍了在XNA游戏中为WP7使用亚洲字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

在为Windows Phone 7的XNA游戏亚洲语言(中文,日文和韩文)本地化时,我很难理解应该如何管理字体.

I am having troubles understanding how i should manage fonts when localizing for Asian languages (Chinese, Japanese and Korean) an XNA game for Windows Phone 7.

我遇到的第一个问题是此处描述的问题: http://msdn.microsoft.com/en-us/library/hh221520.aspx .常规语言(英语,德语,西班牙语等)所使用的字体中缺少这些字符,大多数字体都应该使用这种字体.令我烦恼的是警告 表示以下字符已被您计算机的系统默认字体中的图像替换"; daccess-ods.un.org daccess-ods.un.org我的系统(Windows 7)的默认字体是Segoe UI,它完全没有缺少的亚洲字符,因为经过测试,结果是原来的.那怎么样 生成的字符图像是源字体,任何人都可以向我解释这显然具有误导性的警告消息吗?

The first problem that i came across was the one described here: http://msdn.microsoft.com/en-us/library/hh221520.aspx . The characters were missing from the font used for the regular languages (English, German, Spanish etc.), which is to be expected for most fonts.  The thing that bugs me however is that the warning says "The following characters [...] were replaced by images from your computer’s system default font"; my system's (Windows 7) default font is Segoe UI, which does not have at all the missing Asian characters, as it turned out after testing it. How are then the character images generated, which is (are) the source font(s), can anyone explain this apparently misleading warning message to me ?

第二个问题是,我想用默认系统"替代此替换.由于许可方面的原因,使用选定的字体.有可能这样做吗?当我们在这里时,您能建议我一些包含亚洲字符的免费字体吗? (但拉丁字体仍类似于常规"字体,例如Arial),并且在为WP7开发XNA游戏时没有许可问题吗?

The second issue is that I'd like to override this replacement with the "default system" with a chosen font, due to the licensing aspects. Is it possible to do so ? And while we're here, can you suggest me some free fonts that include the Asian characters (but with the Latin ones still resembling "regular" fonts, such as Arial) and that don't have licensing problems when developing XNA games for WP7 ?

谢谢.

推荐答案

我为CJK使用了不同的字体.   EFIGS使用一个.spritefont,中文(Trad)使用另一个.spritefont,中文(Simp)使用另一个.spritefont,日语使用自己的.spritefont,而朝鲜语使用自己的.spritefont.  在游戏发布时,我会检查当前 显示语言并加载适当的SpriteFont.  我还使用本地化管道扩展来仅使用字符串表中的字符来创建.spritefont.

I use different fonts for CJK.  EFIGS uses one .spritefont, Chinese (Trad) uses another .spritefont, Chinese (Simp) uses another .spritefont, Japanese uses its own .spritefont and Korean has its own .spritefont.  At game launch, I check the current display language and load the appropriate SpriteFont.  I also use the localization pipeline extension to create a .spritefont using only the characters in the strings table.

请勿尝试将所有语言的所有字形放在一种.spritefont中.  这不会浪费内存(为什么用日语玩游戏时内存中会保留韩国字形?),但是您将尝试使用多种字体中的字形来创建一个SpriteFont.  每种字体使用一个.spritefont.

Do not try to put all glyphs for all languages in the one .spritefont.  It will not waste memory (why have Korean glyphs in memory when the game is played in Japanese?), but you will be trying to use glyphs from several fonts to create one SpriteFont.  Use one .spritefont per font.


这篇关于在XNA游戏中为WP7使用亚洲字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆