I am working on a project that requires a specific font for several of the UILabel elements. At first, I thought I was going to have to use CoreText but it actually is much, much easier to implement. This assumes you have the physical font file. (.ttf font file), and you have added it to your project. At this point you just need to access it from within your app.
First, in XCode locate the application .plist file. Usually called, [YOUR_APP_NAME]-Info.plist. (I rename many of the groups in my applications so your mileage may vary a bit.) Once you locate the file, add a new row of key: "Fonts provided by application". XCode will create the first key/value pair for you. Here is a screenshot of my .plist file entry.
Add the name of the font file in the "value" column. Be sure to spell the name of the font file EXACTLY as it is in seen in the list of files in your project. This is NOT the name you will be referencing from within your UIFont statement. This is just so your app knows where to find the font you will be referencing.
Next, you need the name of the fontface you are going to use. For this example it is Gloucester MT Extra Condensed. Now you reference it in your app.
[myLabel setText:@"Some Text"];
[myLabel setFont:[UIFont fontWithName:@"Gloucester MT Extra Condensed" size:24.0]];
Build and run your program. You should now see your interface as it was meant to be seen. With all of it's Fonty goodness. (I made that word up.) The key here is that it is REALLY important that you make sure to include any spaces, dashes or underscores in the name of the font. If it's not working for you, go back and check the filename and/or the font name you pass to your UI element.
It's A Font Family Affair
OK, now you have successfully rendered a UILabel where you had a font file with only one variant. What if you have a font file that has several variants. For example, Futura has Futura Medium, Medium Italic, Condensed Medium and a few others. How are you supposed to handle that? Well you can't. You're screwed. JUST KIDDING! Settle down. Settle down. UIFont has the method: fontNamesForFamilyName that returns all of the variants for the specified font family.
Now, remember way back a few paragraphs ago I told you to include spaces in the UIFont name? Well when you are using fontNamesForFamilyName, you need to put in the name EXACTLY as it shown within the returned array.
So as you can see, using custom fonts is pretty easy in IOS 5. You no longer have to tell your Designer to stick it when they come up with their funky UI ideas. (You may tell em' to stick it anyway.)
In Xcode, go to Summary -> Build Phases -> Copy Bundle Resources and add your font files there if they are not already appearing here after adding them to your project .plist file. If you're not seeing the custom fonts you added being applied to your UI elements, this may be the reason why.