1、下载bmfont工具
地址:http://www.angelcode.com/products/bmfont/
2、安装启动,,右边为字体库,可根据需要选择
3、选中所需要所字符,配置“Options->Export Options”, 弹出设置选项,配置生成fnt文件及png图片:
3、生成了.fnt 和.png文件,copy至工程Resources目录下,添加测试代码:
CCLabelBMFont *bm = CCLabelBMFont::create("789512", "1.fnt");
bm->setPosition(ccp(visibleSize.width/2, visibleSize.height/2));
this->addChild(bm);
4、运行