Can I embed a custom font in an iPhone application

0 votes
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?
Sep 21 in IOS by Soham
• 9,330 points
19 views

1 answer to this question.

0 votes
This is supported by iOS 3.2 and later. Straight from the document describing what's new in iPhone OS 3.2:

Individual Font Support
Applications that want to use custom fonts can now do so by include the UIAppFonts key in their Info.plist file and registering those fonts with the system. An array of strings indicating the font files in the application's bundle make up the value of this key. The system loads the requested fonts and makes them available to the programme when it detects the key.

You can utilise your custom fonts in IB or programmatically once the fonts have been configured in the Info.plist.

On the Apple Developer Forums, the following discussion is ongoing:
https://devforums.apple.com/thread/37824 (Login necessary)

And, now a

good and straightforward three-step explanation for achieving this (broken link removed)

Xcode can be used as a resource to add your project's own font files.
Your Info.plist file should now have the UIAppFonts key.
Make this key a collection.
Enter the complete name of each font file you have (including the extension) as an entry in the UIAppFonts array.
Conserve Info.plist
To get the custom font to use with your UILabels and UITextViews, etc., you can now just call [UIFont fontWithName:@"CustomFontName" size:12] in your application.
Be sure the typefaces are included in your Copy Bundle Resources as well.
answered Sep 22 by Rahul
• 9,240 points

Related Questions In IOS

0 votes
0 answers

How I can open native alarm clock in iphone by using code?

I need to create a sample app ...READ MORE

Sep 22 in IOS by Soham
• 9,330 points
10 views
0 votes
1 answer

what font face of clock on lock screen of iPhone (iOS 9)?

San Francisco is the default font in ...READ MORE

answered Sep 20 in IOS by Aditya
• 7,660 points
14 views
0 votes
1 answer

Detecting iPhone 6/6+ screen sizes in point values

The device screen will be the first ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,240 points
21 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,240 points
16 views
0 votes
0 answers

iPhone system font

What is the name of the default ...READ MORE

May 16 in Others by Kichu
• 19,040 points
28 views
0 votes
1 answer

iPhone system font

The iPhone system interface uses Helvetica or ...READ MORE

answered Sep 20 in Others by Aditya
• 7,660 points
19 views
0 votes
0 answers

Launch an app from within another (iPhone)

Is it possible to open any iPhone ...READ MORE

5 days ago in IOS by Soham
• 9,330 points
9 views
0 votes
0 answers

How to create Multiple Themes/Skins for iphone apps?

I already have an iPhone app that ...READ MORE

5 days ago in IOS by Soham
• 9,330 points
15 views
0 votes
1 answer

How to build a font generator in iOS Swift and allowing pasting to clipboard

On your iPhone, you cannot copy and ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,240 points
23 views
0 votes
1 answer

How is a rounded rect view with transparency done on iphone?

view.layer.cornerRadius = radius; The difficult technique is to ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,240 points
18 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP