Cocoa – Add shadow (recessed text effect) to Cocoa label without degrading text rendering quality

antialiasingcocoanstextfieldshadow

I'd like to create statusbar with text effect like in Safari or iTunes, i.e. recessed text.

example

However, if I simply add shadow in Interface Builder using Core Animation panel, OS X's worst text rendering kicks in:

wheres my subpixel

What's the trick to get recessed text on a label and keep proper subpixel rendering?

Best Answer

There is a built-in way to do this:

[[yourTextField cell] setBackgroundStyle:NSBackgroundStyleRaised];
Related Topic