3

I have an app with UIWebView which loads a remote HTML page...Now on this HTML, I have set font-family: Calibri; and font-size: 12pt;

But for some reasons, this font is not applied while viewing the page from the app...

I can see the font from a regular browser.

How do I get the same font to be applied from the app also ?

copenndthagen
  • 49,230
  • 102
  • 290
  • 442

1 Answers1

2

As far as I know, the Calibri font isn't included by default in the iOS framework, which is why the font isn't showing in your UIWebView but it is in your browser (for a list of iOS fonts, check out http://iosfonts.com).

To add a new font to your app, you must do it manually (don't worry, it's pretty straightforward !).

Check out this answer here to see how.

There are also a few decent tutorials on how to include custom fonts in your app:

http://kgriff.posterous.com/45359635 (more info in the comments too)

and

http://iosdevelopertips.com/user-interface/load-and-access-custom-fonts.html

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mutix
  • 4,196
  • 1
  • 27
  • 39