Weird glitches when using CCLabelBMFont

Hi,

I’m seeing strange glitches when using a CCLabelBMFont. Regardless I’m using Android or iOS (which at least is consistent) I see little dark bars (as you can see on the screenshots).
Does anyone know what I’m doing wrong. I’ve built the font (.fnt + .png) from Hiero.

Here are the screenshots:

iOS:

Android:


android.png (19.5 KB)


ipad.png (47.4 KB)

Looks that you scale your label. This lines came from neighbor characters in atlas. To avoid them you shouldn’t scale your labels or ensure that there is spaces between characters in texture.

Hi, thanks for your answer !

I’m pretty sure I don’t scale the font, this is the way I’m using the CCLabelBMFont:

CCLabelBMFont *scoreLabel = CCLabelBMFont::create("Score", "font.fnt");
scoreLabel->setAnchorPoint(ccp(0, 0));
scoreLabel->setPosition(ccp(10, 455));
addChild(scoreLabel);

Now, you’re right on the font.png file, there is no space between glyphs:

However, I used this font with libgdx with no troubles. I’m going to try to generate the font with spaces between glyphs.

Thank you for the tip.

Ok, you were right. Using the following setting in Hiero fixed the problem: