I would like to have an app include a custom font for rendering text, load it, and then use it with standard UIKit
elements like UILabel
. Is this possible?
Ios – embed a custom font in an iPhone application
cocoa-touchfontsios
Related Question
- Ios – How to link to apps on the app store
- Ios – How to lose margin/padding in UITextView
- Ios – How to sort an NSMutableArray with custom objects in it
- Ios – How to check for an active Internet connection on iOS or macOS
- Ios – How to make a UITextField move up when the keyboard is present – on starting to edit
- Android – embed a custom font in an Android application
- Ios – Passing data between view controllers
- Android – How to Set a Custom Font in the ActionBar Title
Best Solution
iOS 3.2 and later support this. Straight from the What's New in iPhone OS 3.2 doc:
Once the fonts have been set in the
Info.plist
, you can use your custom fonts as any other font in IB or programatically.There is an ongoing thread on Apple Developer Forums:
https://devforums.apple.com/thread/37824 (login required)
And here's an excellent and simple 3 steps tutorial on how to achieve this (broken link removed)
Info.plist
file calledUIAppFonts
.UIAppFonts
arrayInfo.plist
[UIFont fontWithName:@"CustomFontName" size:12]
to get the custom font to use with your UILabels and UITextViews, etc…Also: Make sure the fonts are in your Copy Bundle Resources.