Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8343285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:00:47+00:00 2026-06-09T06:00:47+00:00

I want to create an app that uses the user’s custom font, therefore I

  • 0

I want to create an app that uses the user’s custom font, therefore I want to my app to load the ttf file at run time.
I am familiar with adding custom font via the UIAppFonts key as discussed in Adding custom font on iphone. Presumably I wouldn’t be successful creating a placeholder custom font that could be swapped out by my app, if provided a user-created custom version?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:00:49+00:00Added an answer on June 9, 2026 at 6:00 am

    The font file I used was this: http://www.webpagepublicity.com/free-fonts/a/Almagro%20Regular.ttf

    And I did it using this code:

     CGDataProviderRef fontDataProvider = CGDataProviderCreateWithFilename([fontFilepath UTF8String]);
    
     // Create the font with the data provider, then release the data provider.
    CGFontRef customFont =  CGFontCreateWithDataProvider(fontDataProvider);
    CGDataProviderRelease(fontDataProvider);
    
    CFErrorRef error = nil;
    CTFontManagerRegisterGraphicsFont(customFont, &error);
    
    CGFontRelease(customFont);
    
    if (error != nil)
    {
        NSError* err = (__bridge NSError*)error;
        NSLog(@"error code %d desc: %@",err.code, [err description]);
    }
    
    UIFont* f = [UIFont fontWithName:@"Almagro" size:14.0];
    

    There are some gotcha’s though. You need to know the font name since it might differ slightly from the file name. In my example, the file name was “Almagro Regular.ttf” but the font name was just “Almagro”. On another forum someone said that you need to be careful about fonts with spaces in their names because a font like “Sans Serif” would be registered as “SansSerif” for UIFont fontWithName:size:

    Let me know if it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an App that uses a potentially large xml file. It
I’m creating a Django website that uses the bundled auth app to create user
Hi I m trying to create app that uses user's profile pic in it.
I want to create an app that uses both MongoDB and MySQL. Specifically, I
I want to create App that Make My Device with multi-Users username and password
I want to create an Android app that can be used on 2.3.3 all
I want to create a web app that lets me create, store and display
I want to create a simple app that shows me the city of the
I want to create an iOS app that contains a uiimageview and a button
I want to create a PHP app that can send text messages ; There

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.