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, 2022 in IOS by Soham
• 9,700 points
323 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, 2022 by Rahul
• 9,670 points

Related Questions In IOS

0 votes
0 answers

How can I do login with google adsense in an iphone app?

How can I log in to an ...READ MORE

Nov 4, 2022 in IOS by Soham
• 9,700 points
1,276 views
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, 2022 in IOS by Soham
• 9,700 points
208 views
0 votes
1 answer

How can I record a conversation / phone call on iOS?

This is for you. complete working illustration ...READ MORE

answered Nov 8, 2022 in IOS by Rahul
• 9,670 points
993 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, 2022 in IOS by Aditya
• 7,680 points
738 views
0 votes
0 answers

iPhone system font

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

May 16, 2022 in Others by Kichu
• 19,050 points
340 views
0 votes
1 answer

iPhone system font

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

answered Sep 20, 2022 in Others by Aditya
• 7,680 points
1,085 views
0 votes
0 answers

Launch an app from within another (iPhone)

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

Sep 28, 2022 in IOS by Soham
• 9,700 points
265 views
0 votes
0 answers

How to create Multiple Themes/Skins for iphone apps?

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

Sep 28, 2022 in IOS by Soham
• 9,700 points
373 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, 2022 in IOS by Rahul
• 9,670 points
610 views
0 votes
1 answer

Why does the NFC range of an iPhone improve with an application?

I'm not familiar with iPhone, but I ...READ MORE

answered Nov 4, 2022 in IOS by Rahul
• 9,670 points
289 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