Re: Breaking underlining on descenders
Re: Breaking underlining on descenders
- Subject: Re: Breaking underlining on descenders
- From: Benjamin Stiglitz <email@hidden>
- Date: Wed, 13 May 2009 14:19:45 -0400
- Mail-followup-to: email@hidden
> 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.
You can draw the underline first, then a large point-width stroke in
NSClearColor in copy compositing mode (or alternatively, the wide stroke
& fill used as a negative mask), then the actual fill on top.
-Ben
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden