On Feb 6, 2009, at 1:08 PM, Eric Slosser wrote:

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?


Douglas Davidson supplied the clue. I needed to add the following line to MyView.mm:

        - (BOOL) isFlipped { return YES; }

Now the underline in my simple test app is right. I'm sure the answer to my real problem is going to be "don't use NSLayoutManager in a non- NSView environment".

_______________________________________________

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