CCLabelTTF kerning not working properly

CCLabelTTF kerning not working properly
0.0 0


I’m printing a text in my game using CCLabelTTF with a font name “ThinLinesandCurves.ttf”. The designer is using the same font on adobe flash. The problem is that when the text is drawn using cocos2dx I get a different result than what the designer gives me on adobe flash.

Does it mean that kerning doesn’t work on cocos2dx 2.2? but the documentations says that it does. Anyone got a similar problem?

I’ve uploaded two pictures showing the difference between cocos2dx and adobe flash. The kerning is clear when you look at the space between the letters “W” and “O”.

Screen Shot 2014-01-31 at 1.34.45 PM.png (7.3 KB)

Screen Shot 2014-01-31 at 1.35.19 PM.png (7.7 KB)


Hi Karim,

I faced same issue with fonts, for my problem i figured that CCImage class had some glitch so, I changed that.
If your problem is same as mine,this Link may help you to understand what I am saying.



Hey Vinit,

I looked at the issue that you had and it’s not the same. My issue have to do with kerning. It seems they got it fixed for v3.0 but not v2.2. Here is a link to the fix and that’s the link for the corrected mistake But then again these files (CCFontAtlas.cpp, CCFontDefinition.cpp and CCFontFreeType.cpp) are only available in v3.0. Is there a way where I can do the same fixes of 3.0 onto 2.2 since the whole code is open source?

Thanks :slight_smile: