• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: underlining
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: underlining


  • Subject: Re: underlining
  • From: Eric Slosser <email@hidden>
  • Date: Tue, 10 Feb 2009 11:55:12 -0500

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


References: 
 >underlining (From: Eric Slosser <email@hidden>)
 >Re: underlining (From: Graham Cox <email@hidden>)
 >Re: underlining (From: Eric Slosser <email@hidden>)

  • Prev by Date: Re: Why its necessary to include .dylib file to project as well as to /usr/local/lib?
  • Next by Date: Re: NSScreen order?
  • Previous by thread: Re: underlining
  • Next by thread: Re: underlining
  • Index(es):
    • Date
    • Thread