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 8634135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:38:51+00:00 2026-06-12T09:38:51+00:00

I would like to display a custom font inside a UIWebView. I have already

  • 0

I would like to display a custom font inside a UIWebView. I have already put the font in the plist under “Fonts provided by application”. The code in use:

        UIWebView *webView = [[UIWebView alloc] initWithFrame:myRect];
        NSURL *baseURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
        [webView loadHTMLString:html baseURL:baseURL];
        [self addSubview:webView];

where html is an NSString that has the following contents:

<html><head>
<style type="text/css">
@font-face {
    font-family: gotham_symbol;
    src: local('GOTHAMboldSymbol_0.tff'), format('truetype') 
} 
body { 
 font-family: gotham_symbol;
font-size: 50pt;
}
</style>
</head><body leftmargin="0" topmargin="0">
This is <i>italic</i> and this is <b>bold</b> and this is some unicode: &#1101;
</body></html>

I’m using iOS 4.2 so TTF should be supported. I’d appreciate a bit of html/code that actually works.

  • 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-12T09:38:52+00:00Added an answer on June 12, 2026 at 9:38 am

    After some Try and Error I have found a reliable way to load custom Fonts with a local CSS.

    1. Add your Font to the App…make sure that the file is targeted
    properly to the Application

    enter image description here
    enter image description here

    2. Then add your Font to yourApp-Info.plist

    enter image description here

    3. Run NSLog(@"Available fonts: %@", [UIFont familyNames]); To check which name the font/fontfamily has for the System…

    enter image description here

    4. Copy that name and use them in your CSS…@font-face is not needed

    body {
        font-family:"Liberation Serif";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my own custom webpart. Inside this webpart I would like to display
I have a WebHelpers WebGrid in MVC 3.0 and would like to custom display
I have a custom listPreference I would like to display a list of apps
I would like to create a custom control in order to display a pie
I would like to display some variables in custom dialog box. For example I
I need to display a custom scrollbar. I would like to avoid using a
In flex 3 I have a hierarchical data structure. I would like to display
I'm looking to create a custom checkbox. I would like to display an active/inactive
I would like to use the system font but with a custom leading, but
I would like to display a custom Modal dialogue. I know about the libraries

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.