4

Label font is not working, I have added fonts folder under asset folder.

pop = CCLabel.makeLabel("Eggs left: ", "fonts/comic.ttf", 14);
Dhrupal
  • 1,863
  • 1
  • 23
  • 38

2 Answers2

2
CCLabel labelMainMenu = CCLabel.makeLabel("OPTIONS MENU", "Fonts/JimboStd-Regular.otf", 20);

I Think you forgot to mention the font size in float. and see that the fonts folder is created in assests ...

Jay Thakkar
  • 743
  • 1
  • 5
  • 24
  • No, if i am writing fonts' size in int then it will type cast to float.. – Dhrupal Jul 30 '12 at 05:44
  • yes it will type cast to float for the size but you want to use the custom fonts as u told then you have to keep them in assests and then use it here ...CCLabel labelMainMenu = CCLabel.makeLabel("OPTIONS MENU", "Fonts/JimboStd-Regular.otf", 20); – Jay Thakkar Jul 30 '12 at 11:20
-1

This was happening because of android-cocos2d.jar.. I have replaced with new jar and now its giving me changed fonts..

Dhrupal
  • 1,863
  • 1
  • 23
  • 38
  • hello, First You have to check at your end and then ask from now onwards as first you are accepting the answer and immediately when you find its your problem you not accepted my answer the right answer for your error was this which i gave you ok...... – Jay Thakkar Aug 08 '12 at 12:18