Re: underlining
Re: underlining
- Subject: Re: underlining
- From: Eric Slosser <email@hidden>
- Date: Fri, 6 Feb 2009 13:08:18 -0500
On Feb 5, 2009, at 6:31 PM, Graham Cox wrote:
On 6 Feb 2009, at 10:00 am, Eric Slosser wrote:
I'm trying to draw underlined strings, but they come out wrong
In what way?
I couldn't really describe it, so I attached a picture to my original
post. The picture got stripped off for some people.
If you don't see it above, I've placed it here:
ftp://v-fx.com/public/underline/underline1.png
The sample project that makes it is there too:
ftp://v-fx.com/public/underline/boldunderline.dmg
I figured out (thanks to Jeff Lynch) that it's not horribly wrong,
it's just that the baseline of the underline is too high. The break
in the underline is there because NSLayoutManager doesn't draw on top
of the descender of the 'p'.
So why is the baseline wrong? Does NSLayoutManager's
drawGlyphsForGlyphRange:atPoint need me to setup the NSView's graphics
context differently?
_______________________________________________
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