Le 8 août 2011 à 18:50, David Duncan a écrit :

> On Aug 8, 2011, at 8:16 AM, 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, …).
> 
> 
> CTFrameGetPath() returns the path used to create the frame, typically a 
> rectangle, not a path that describes the text therein.

My bad.
So I guess the only way to get the path is to use CTFontCreatePathForGlyph() on 
each glyph and using other CT methods to get there positions.
Not as convenient, but possible, especially if this is for a single line of 
text as requested by the OP.

-- 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