本文对于irrlicht的改动旨在使得irrlicht 1.7.2 -svn版本对于unicode字体能够很好的支持,实现读取/写入/绘制等操作。方法来源irrlicht官方论坛Nalin实现的解决办法。
此方法基于 ustring class. The ustring class, CGUITTFont class, and the CStringTable class
下载irrlicht源码,当前最新版本为1.7.2,或者使用svn版本。
ustring
Download: irrUString.h
ustring is a UTF-16 string class. It can convert to/from UTF-8 and UTF-32. Using an iterator, one can gain access to each unicode character in the string. This is the base class used by everything else. It is heavily documented in doxygen format. It also supports C++0x move semantics for users of Visual C++ 2010 and GCC (when using -std=c++0x). This provides a performance improvement when dealing with a lot of temporary copies (ie, chaining multiple strings together with +).