如何在XNA中绘制特殊字符? [英] How to draw special characters in XNA?

查看:109
本文介绍了如何在XNA中绘制特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用方法
在XNA中绘制特殊字符,例如:π,Ω,θ,ξ" spriteBatch.DrawString()但未成功.文件SpriteFont有问题吗?有什么解决方案吗?

I want to draw special characters like: "π,Ω,θ,ξ" in XNA by using method
spriteBatch.DrawString() but unsuccessful. Problem in file SpriteFont? Have any solution for it?

推荐答案

请查看我对该问题的评论,并稍微阅读一下Unicode,以了解一个想法.您不需要任何特殊的支持.默认情况下,几乎所有现代系统都默认支持Unicode,并且默认情况下,当然也包括希腊语这样流行的"Unicode范围".一些不支持Unicode的怪异字体逐渐被淘汰...

http://en.wikipedia.org/wiki/Unicode [ http://en.wikipedia.org/wiki/Code_point [ http://en.wikipedia.org/wiki/UTF [ http://en.wikipedia.org/wiki/Byte_order_mark [ http://unicode.org/ [ ^ ],
http://www.unicode.org/faq/utf_bom.html [
Please see my comment to the question and read on Unicode just a bit, to have an idea. You don''t need any special to do to support it. Nearly all modern systems support Unicode by default, and of course, such a popular "Unicode range" as Greek is included, also by default. Some weird fonts which do not support Unicode are gradually phased out...

http://en.wikipedia.org/wiki/Unicode[^],
http://en.wikipedia.org/wiki/Code_point[^],
http://en.wikipedia.org/wiki/UTF[^],
http://en.wikipedia.org/wiki/Byte_order_mark[^];

http://unicode.org/[^],
http://www.unicode.org/faq/utf_bom.html[^].

—SA


我自己解决了这个问题!在我的课上,spritefont.我已经对其进行了
I''ve solved this myself! In my class spritefont. I''ve been edit it flowing:
<characterregions>
      <characterregion>
        <start>& #32;</start>
        <end>& #126;</end>
      </characterregion>
      <characterregion>
        <start>& #913;</start>
        <end>& #969;</end>
      </characterregion>
    </characterregions>


& #913-> & #969是希腊字符,例如π,Ω,θ,ξ".它以"A"开头,以ω"结尾


& #913 -> & # 969 are Greek charaters like "π,Ω,θ,ξ". It begin "A" and the end "ω"


这篇关于如何在XNA中绘制特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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