Search code examples
objective-ccocoacore-graphicscore-textskitch

Emulating Skitch's Text Effect


Skitch has this nice effect where it will draw its text on a white background. I'd like to emulate this effect. I found this article on Cocoabuilder where an example approach is given. It kind of works, but has some really sharp corners on the outline where Skitch has nice soft corners. Note how smooth the point of Skitch's 'S' is compared to my attempt using the "draw it twice" algorithm (Skitch on left, my attempt on the right).

Skitch's Text My Attempt

Any ideas on what sort of approach to take to get those nice soft corners?


Solution

  • My first thought here would be to convert the glyphs to paths, and then stroke those paths behind. See CTFontCreatePathForGlyph and similar techniques for how this might work.