On 08/08/2011, at 12:16, Jean-Daniel Dupas wrote:

> I think you can create a CGPath from some text using CTFrameGetPath().
> Once you get the path, you can do whatever you want (clipping, shadow, 
> gradient, …).

Ah, then that's the way to go! Thanks Jean-Daniel.

The image I created used as background a gray ~79% (RGB 201/255). Then, the 
shadow can be applied in a 115º angle or so, 1px distant and size of 3 px. 115º 
in x,y coordinates after a rough calculation gives 0.422 and 0.906 (sin and cos 
of 65º). Also, the color used to produce the shadow was a gray 25%. The result 
is pretty similar.

> 
> Le 8 août 2011 à 02:22, Andre Masse a écrit :
> 
>> Interesting. Not sure if could be possible to convert the text to an image, 
>> apply a gradient and use one of the copy method of NSImage. I needed a break 
>> from coding data migration, hence the pause trying this. Now, I'm back to 
>> the boring part ;-)
>> 
>> 
>> On 07/08/2011, at 14:12 , Siegfried wrote:
>> 
>>> 
>>> On 07/08/2011, at 10:52, Andre Masse wrote:
>>> 
>>>> For those interested, Matt and Kyle were right. Helvetica Neue Bold 20pts. 
>>>> All my attempts to replicate the shadow have failed though. I'm using 85% 
>>>> white and it's good enough for me.
>>>> 
>>> 
>>> The shadow is just an "inner shadow". The problem is that I have no idea on 
>>> how to create an inner shadow in Cocoa. The obvious technique is to apply a 
>>> shadow on a white layer that has holes in form of letters. But I also have 
>>> no idea on how to do such intersection.
>>> 
>>> See the attached image and tell me if you like it. By the way, let's see if 
>>> you find which one is the original :-)
> 
> 
> 
> -- Jean-Daniel
> 
_______________________________________________

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