In games, we often encounter the need to display a large Chinese conversation. In this case, we need to load some custom Chinese character formats and generate a pile of pictures directly from the art, which is too memory-consuming for mobile phones, at this time, hiero came into being.
Hiero can generate png and tnf files in specific fonts for all characters, and program code in the program to display rich and colorful man content.
1. hiero download link: http://download.csdn.net/detail/u010229677/6992501
2. hiero usage
<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + 1 + 6687Wlu/fOxLz + vLS/ybGjtOZwbmejrDwvcD4KPHA + signature/Signature/Co7o8L3A + signature "brush: java;"> Women We Dajia Everybody Pengyou Friend
In this way, each Chinese field has a key, which can be used to obtain Chinese characters.
2. Code Implementation
CCDictionary *strings =CCDictionary::createWithContentsOfFile("one.xml"); const char *charwomen= ((CCString*)strings->objectForKey("women"))->m_sString.c_str(); CCLabelBMFont* labelFont =CCLabelBMFont::create(charchinese, "one.fnt"); labelFont->setPosition(ccp(100,100)); addChild(labelFont);
Then we can display our defined "we ".