fontscocos2d-xcclabelttf

Custom fonts with CCLabelTTF on Cocos2d-x (XCode) not working


I have a problem when using custom fonts, I have made everything this link (http://www.cocos2d-x.org/wiki/How_to_Use_Custom_TTF_Font_on_iOS) says.

I've looked the answers here and nothing works.

Things I've done:

*Load the Font.ttf into XCode

*Add font/Font.ttf into *.plist

*Verify the file is within "Copy Bundle Resources"

*Use the PostScript name

*Verify the font file is in the target

*My code:

CCLabelTTF *name = CCLabelTTF::create("Text", "KBSketch", 30, CCSizeMake(300, 0), kCCTextAlignmentCenter);

But it still doesn't work! PLEASE HELP!


Solution

  • Did you try without "font" directory name? I mean "Font.ttf" instead of "font/Font.ttf" in *.plist