Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C – iOS5 font rendering has changed?

In iOS4 (4.3 simulator) when I use the font Myriad Pro with the following font method for a cell:

cell.titleLabel.font = [UIFont fontWithName:@"Myriad Pro" size:14];

It looks like this:

enter image description here

In iOS5 (5.0 simulator) when I use the font Myriad Pro with the same font method it looks like this:

enter image description here

Has anyone experienced this behaviour as well (perhaps with other fonts?).

like image 815
Peter Warbo Avatar asked Nov 02 '11 13:11

Peter Warbo


1 Answers

When using +fontWithName:size: on iOS 5, the font name parameter needs to be the full name of the font file in your app bundle and not just the font family name.

like image 161
Mark Adams Avatar answered Sep 19 '22 16:09

Mark Adams