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