New games every week!
Check your fonts.. Blog
16th January 2012
So, I'm sitting there trying to get a nice GameCenter thing added to my new framework, and I figured that having to display people's names might very well require a bit of Unicode..
(Note : This is the reason my other iOS games don't have names on the highscore lists!)

In Cocos, you can use 3 font styles.. one is a simple bitmap font (this one I can handle!) one is a complex bitmap font (with a required 50,000,000,000,000 images to handle all the possible languages!) and the third one uses ttf fonts.

Obviously, I opted for the ttf one!

-=-=-

It's relatively simple to switch from the simple bitmap font to the ttf one, requiring not much more than a change in name for it all to work swimmingly.

.. 10pm.
Change the name, add a nice font, test.

10:10pm
Why is it still not showing up?

10:20pm
Debug-o-rama..
Yes, that element's there, and it says it's onscreen..
WTF?!

10:30pm
grrr.

By about 11'ish, I'd checked pretty much everything..

I checked the position of the text, tried different font sizes, changes the amount of text, double checked the opacity and colours, and tested that it wasn't being drawn under everything else.

Still not showing up, and really starting to wind me up!
..then I discovered the problem.

It was the font itself.
A quick change of font, and bingo.. there it was.

An hour wasted, and all because the system didn't go "Hey, this font's not working!"

Thanks!
Views 36, Upvotes 6  
Daily Blog
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed 5

Blog - Check your fonts.. - AGameAWeek