how to add bitmap font Label?

how to add bitmap font Label?
0.0 0


Hi everyone, I used this to generate a font.fnt and font.png and I’ve correctly included them into project.

However, when I used folowing code and got an issue:

var hellolabel = ccs.LabelBMFont.create();
hellolabel.setText(“My Game”);
helloLabel.setPoition(ccp(this.size.width/2,this.size.height -100));

But I’ve got following error:

Thread 1:EXC_BAD_ACCESS(code=1,address=-x38)

break at this function:

bool CCTexture2D::hasPremultipliedAlpha()
return m_bHasPremultipliedAlpha;


what’s the reason?


Hi, @cht8586

If your question is about cocos2d-x, then it’s better to post it at this address:
I’m sure you will get your answer there.