Re: Custom Fonts in UI Webview
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