Possible Duplicate:
Can I embed a custom font in an iPhone application?
How can I customize font in my iPhone app?
Is it possible?
How can I use this custom font in a UILabel
?
I am trying to add MYRIADPRO-SEMIBOLD.OTF
font in my App.
and the code is
UIFont *customFont = [UIFont fontWithName:@"MYRIADPRO-SEMIBOLD" size:35];
titleLbl.font = customFont;
And the Plist is
You can download fonts from the App Store app , then use them in documents you create on iPhone. After you download an app containing fonts from the App Store, open the app to install the fonts. To manage installed fonts, go to Settings > General, then tap Fonts.
Add the Font File to Your Xcode Project To add a font file to your Xcode project, select File > Add Files to “Your Project Name” from the menu bar, or drag the file from Finder and drop it into your Xcode project. You can add True Type Font (. ttf) and Open Type Font (. otf) files.
Try the steps below:
1. Make configuration in the info.plist as shown in Image
2. Now you should use that added file
UIFont *customFont = [UIFont fontWithName:@"fontName" size:size];
// further you may set That Font to any Label etc.
EDIT: Make Sure you have added that file in your resources Bundle.
Copy your font file into Resources.
In your application .plist create (if it exists just create a row) a row called Fonts provided by application
and then in item 0
copy your font name for example Ciutadella-Bold.otf
Then you can define this font in your application:
UIFont *CiutadellaBold = [UIFont fontWithName:@"Ciutadella-Bold" size:17.0f];
And use it in for instance in UILabel
:
[uiLabel setFont:CiutadellaBold];
It is totally possible. Please check the following links to implement your solution.
iPhone Development: how to use custom fonts?
How to add custom fonts to an iPhone app?
how to use custom font in iphone application
Can I embed a custom font in an iPhone application?
I hope these links help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With