• 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: 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


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

  • Prev by Date: NSProgressIndicator (spinning) on a dark background?
  • Next by Date: Re: underlining
  • Previous by thread: Re: underlining
  • Next by thread: Re: underlining
  • Index(es):
    • Date
    • Thread