• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom Fonts in UI Webview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Fonts in UI Webview


  • Subject: Re: Custom Fonts in UI Webview
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 14 Sep 2009 15:08:20 -0700


On Sep 14, 2009, at 2:43 PM, Ben Lachman wrote:

I was looking at the NYTimes iPhone app today and noticing that it looks like they're using a UIWebView with a custom font (not sure what font though, anyone know?). I did some digging on how to do this and couldn't come up with anything except one bit about @font- face being deprecated on MobileSafari. I saw a lot of references to using Cufón (or similar), however that doesn't allow for copying or selection and the NYTimes app does. anyone know of a way to use a real custom font face in a UIWebView?

Embed the font file in your app. IIRC there is a special Info.plist key that points to a subdirectory containing font files, which will automatically be enabled. See the docs on Info.plist keys.


Then you don't need to use @font-face, you can just reference the font name in your stylesheet.

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom Fonts in UI Webview
      • From: Ben Lachman <email@hidden>
References: 
 >Custom Fonts in UI Webview (From: Ben Lachman <email@hidden>)

  • Prev by Date: Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];
  • Next by Date: Re: Mac Mini or iMac for Cocoa Development?
  • Previous by thread: Custom Fonts in UI Webview
  • Next by thread: Re: Custom Fonts in UI Webview
  • Index(es):
    • Date
    • Thread