1

How can I acheive a font like this?

alt text

It's the name below icons on the iOS platform. Is it Helvetica, and how can I achieve the soft shadow that it has in code? Thanks in advance!

sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161

3 Answers3

2

you can do it using Quartz 2D.

A shadow is an image painted underneath, and offset from, a graphics object such that the shadow mimics the effect of a light source cast on the graphics object, as shown in Figure 7-1. Text can also be shadowed. Shadows can make an image appear three dimensional or as if it’s floating.

look here:

http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_shadows/dq_shadows.html%23//apple_ref/doc/uid/TP30001066-CH208-TPXREF101

good luck

shannoga
  • 19,649
  • 20
  • 104
  • 169
2

EDIT

BoltClock answered it already in a comment. Follow his link.

(I just discovered he said the same thing, but I want to draw attention to it so I'll leave this answer -- just don't check it, or BoltClock, add it as answer.)


This answer to a previous similar question explains how to do it. Turns out it's pretty simple.

Community
  • 1
  • 1
Matthew Frederick
  • 22,245
  • 10
  • 71
  • 97
  • I voted you up, actually :) (I don't like posting these kinds of links as answers, but if someone does I'll definitely give them my vote.) – BoltClock Dec 21 '10 at 15:26
  • @BoltClock If you could add your comment as an answer I'd accept it as the right one since I believe you got the answer first. – sudo rm -rf Dec 21 '10 at 15:27
  • @BoltClock Yeah, I'm just now realizing that links to perfectly good answers here on SO are more appropriately comments. It's taken a bit to pick up some of the unstated protocols. :) – Matthew Frederick Dec 21 '10 at 15:30
  • Since both of you requested I add it as my own answer, how could I say no? I'll leave my vote on your answer there though :) – BoltClock Dec 21 '10 at 15:32
  • Not sure what the standard procedure is here, sorry if it's against standard system to ask for an answer from a comment. :) – sudo rm -rf Dec 21 '10 at 15:35
  • @sudo rm -rf: It's OK, it's simply my personal policy not to post a link to another answer and call it my own answer. If someone asks me to I guess I won't mind. – BoltClock Dec 21 '10 at 15:39
2

Reposting my comment here as requested:

This answer may help.

As discussed in the comments, that font is indeed Helvetica, at least on standard-resolution devices. I'm not too sure if it's Neue Helvetica on retina display devices.

Community
  • 1
  • 1
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • Thank you for the link to the answer! I hesitate to use quartz because of speed issues, but it gives the appearance I'm looking for. Thanks! – sudo rm -rf Dec 21 '10 at 15:32
  • Shouldn't be too much of a problem actually. iPhone draws stuff relatively quickly and smoothly... compared to some other mobile devices. – BoltClock Dec 21 '10 at 15:36