| George 的个人资料George's XNA Programming日志列表网络 | 帮助 |
|
|
2月1日 Nuclex.Fonts - An Elegant SolutionIn the first post I mentioned the infancy of XNA. One aspect where you can feel this is a lack of any text rendering capabilities. We do not have many alternatives here. Thus, we must resort to bitmap fonts which must be created (for this you need some kind of tool) and then used in the project (for this you need some classes too). To use this method, you may wish to check out the following link http://blogs.msdn.com/garykac/articles/732007.aspx. However, there is a better and more elegant way - enter Nuclex Fonts. Nuclex Fonts is a Content Pipeline Importer that imports any TrueType Fonts in your XNA project at compile time. Further, you can use the font the same way as you use Textures, Models, etc. I have recently downloaded Nuclex Fonts and it was extremely easy to use. The application was rendering texts in 5 minutes. I do not think you can devise any easier way to implement text rendering. So, if you are still reading this, just open up your browser and download Nuclex Fonts from http://www.nuclex.org/downloads/developers/kits/nuclex-fonts-1-1-0. Please note that as of now Nuclex Fonts does not support importing UNICODE fonts but as the author mentions in his web site it will be coming up soon. On a positive side, I would mention that the quality of rendered text is perfect (antialiasing is supported too), works both on PC and on XBOX and is extremely efficient and the best of all, the author provides source code. So nice! 引用通告此日志的引用通告 URL 是: http://xnadev.spaces.live.com/blog/cns!8B6E83562E8DE240!116.trak 引用此项的网络日志
|
|
|