On Sep 14, 2009, at 6:08 PM, Jens Alfke wrote:

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.


After some looking, I think you're talking about ATSApplicationFontsPath. Unfortunately although it shows up in the iPhone docs, it state that it only works on Mac OS X. I'm working on iPhone so this really doesn't help much.

However, I also found after checking the NYTimes app again that they're actually using Georgia for their font face, not anything custom.

->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

email: blach...@mac.com
twitter: @benlachman
mobile: 740.590.0009



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to