how to display the Traditional/simple Chinese in the cocos2d-x ????

how to display the Traditional/simple Chinese in the cocos2d-x ????
0.0 0


hey everybody, i am a newbie in developing cocos2d-x, i got some problem below….

The only one solution i’ve found is to use “CCLabelTTF::labelWithString” to display the label in Traditional Chinese,and the displaying string(Traditional Chinese) must be utf8 format…

On the other way, i use the “CCLabelBMFont::bitmapFontAtlasWithString” to display the Traditional Chinese used by bitmap,first i use “Bitmap Font Generator” to generate the XXX.png and XXX.fnt, if i choose the Latin charset in the XXX.png and there is no error during the cocos2d-x running, but when i use the chinese charset instead, i got the error like “characterDefinition->charID < kCCBMFontMaxChars” when FNTConfigLoadFile executing

  1. Did XXX.png has the limitation of chars ? how can it work well by this way to display the Chinese?
  2. Did cocos2d-x can support mutilple bitmap fonts?
  3. Did any function can support to load “.ttf” in cocos2d-x(except the third part by iOS lib)
  4. Any other functions can support to display the Traditional/simple Chinese???

thanks for response in advance….

the following appendix is what i’ve made Bitmap font by using “Bitmap Font Generator”

Best Regards!:slight_smile:

test_0.png (91.1 KB) (6.0 KB)


hello, cocos2d-x could display simple chinese using cclabelttf.

CCLabelBMFont is only used to display english symbols, but infact you could use it to display chinse in a smart way, you could replace the english symbols in .png with chinese characters you want.


I’ve asked in other topic about incorrect CCLabelBMFont implementation. In our project we use slightly modified version of this class and easily support several languages.


ok, it mainly related to the indexes of the symbols.

then, how did you modify it?
could you share it here?


In brief, we’ve replaced all char* to wchar_t* and std::string to std::wstring

But that version of class can’t support CCLabelProtocol, this is why this modification can’t be easily pushed to main repository.