PDA

View Full Version : How to set custom font?




Sergio10
Jun 19, 2009, 09:03 AM
Hi,

I added my custom font (myfont.ttf) to the project and want to set it for a UILabel control:

[label setFont: [UIFont fontWithName: @"myfont" size: 30]];

And have a crash. What I'm doing wrong? Could you help me solve the problem?

Thanks



jnic
Jun 19, 2009, 09:07 AM
I'm afraid it's nowhere near that simple (unless 3.0 now provides custom font support?)

Try here: http://stackoverflow.com/questions/360751/can-i-embed-a-custom-font-in-an-iphone-application