2

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!

mtet88
  • 524
  • 6
  • 21
  • Just to clarify, the text is shown correctly but with the standard font, not the custom one – mtet88 Mar 15 '14 at 14:57
  • Hi, welcome to StackOverflow. A few guidelines: as a general rule, please try to provide the context inside the question, not in an external link (if it's too long at least sum it up briefly and point to the link as reference). To provide additional information, you should edit the question and not put it in the comment: it's clearer for everyone. You'll get more answers that way. Have fun! – Robin Mar 15 '14 at 15:22

1 Answers1

2

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

Turkdogan Tasdelen
  • 898
  • 1
  • 11
  • 25