FROM : glenn andreas
DATE : Thu Dec 16 22:01:06 2004
On Dec 16, 2004, at 2:54 PM, Lorenzo wrote:
> Hi,
> straight question: how can I tranform a NSAttributedString in a Bezier
> path?
>
> Best Regards
>
Build an NSLayoutManager that uses that attributed string, and use that
to convert to a series of glyphs. Iterate through the glyphs, find the
font for each, and ask that font for the outline. Append that outline
to the bezier path (or, for multiple glyphs from the same font, use
appendBezierPathWithGlyphs:inFont:), and advance based on an
NSTypesetter.
Lots of little details to get just right for what seems at first glance
to be a simple task...
Glenn Andreas <email_removed>
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
DATE : Thu Dec 16 22:01:06 2004
On Dec 16, 2004, at 2:54 PM, Lorenzo wrote:
> Hi,
> straight question: how can I tranform a NSAttributedString in a Bezier
> path?
>
> Best Regards
>
Build an NSLayoutManager that uses that attributed string, and use that
to convert to a series of glyphs. Iterate through the glyphs, find the
font for each, and ask that font for the outline. Append that outline
to the bezier path (or, for multiple glyphs from the same font, use
appendBezierPathWithGlyphs:inFont:), and advance based on an
NSTypesetter.
Lots of little details to get just right for what seems at first glance
to be a simple task...
Glenn Andreas <email_removed>
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
| Related mails | Author | Date |
|---|---|---|
| Lorenzo | Dec 16, 21:54 | |
| Ricky Sharp | Dec 16, 21:59 | |
| glenn andreas | Dec 16, 22:01 | |
| John Stiles | Dec 16, 23:04 |






Cocoa mail archive

