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!

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top