How can I add Copperplate Gothic Bold font in my iPhone program ?
Posted
by srikanth rongali
on Stack Overflow
See other posts from Stack Overflow
or by srikanth rongali
Published on 2010-05-19T10:45:16Z
Indexed on
2010/05/19
10:50 UTC
Read the original article
Hit count: 248
Hi, I need to display some text in cocos2d layer. I added UITextView to it. I added the text in the text View. But, for setting the font by ( UIFont class), I could not do it. I saw the list of supported fonts for iPhone, In that list Copperplate Gothic Bold is not there. I downloaded it from net. It is working good for CCLabel and CCFontMenuItem. How can I make it work for UILabel ?
* Assertion failure in -[UILabel setFont:], /SourceCache/UIKit/UIKit-963.10/UILabel.m:445
2010-05-19 16:07:43.282 testOfGameScreen[1155:207]
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: font != nil'
2010-05-19 16:07:43.285 testOfGameScreen[1155:207] Stack: (
I am getting the above error when using UIFont with Copperplate Gothic Bold
Thank you.
© Stack Overflow or respective owner