I have code that lays out text along arbitrary paths. I've been working on making this as compatible with standard text layout as possible, and it's 99% there.

In my case, I can't let the layout manager directly handle the underlining because on an arbitrary path, the underline ends up as a series of disconnected straight lines under each glyph which is very ugly. So instead, I suppress the underline attribute for the layout manager and handle it myself by figuring out the underline ranges and using segments of my actual path, suitably offset, to underline in a smooth curve. That's working fine and looks much nicer.

When standard text lays out with underlining, the underline is interrupted around descenders, which is nice. Unfortunately my underlining code doesn't do this, and I can't see a simple way or layout manager delegate method I could use to figure out where the breaks should go. Is there somewhere else I should be looking, or is there no public method to help here? If the latter, any ideas on how I could figure out the break positions? All I need is a list of offsets relative to the line fragment rect where the breaks are.

--Graham






_______________________________________________

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