add custom fonts

Send Snippet To: Save this snippet to Code Collector Pro -- view all balzan's snippets
language: Objective-C
license: Other

Code for Snippet:

Here are the steps transcribed:
Add your custom font files into your project using XCode as a resource
Add a key to your info.plist file called UIAppFonts.
Make this key an array
For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array
Save info.plist
in your code use the Postscript name of the font (install font on your mac open font book search for POSTScript file name) use that name in your code
Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels and UITextViews, etc…
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 363
Date Added: 2012-11-02 02:29:52
Last Modified: 2014-02-18 20:29:30

Web Analytics