Re: underlining
Re: underlining
- Subject: Re: underlining
- From: Graham Cox <email@hidden>
- Date: Fri, 6 Feb 2009 10:31:33 +1100
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?
The code looks OK to me, the -drawGlyphsForGlyphRange:atPoint: claims
it handles all the underlining, etc.
I just had a load of pain with underlining too - what is drawn by
NSLayoutManager is different from what the font metrics returned by
NSFont suggest are the correct sizes and offsets for underlining. It
varies with every font. I couldn't figure out exactly how
NSLayoutManager arrived at its underlining decisions so in the end I
gave up and just did what NSFont told me plus some minor tweaks to
make it come out the same as NSLayoutManager for Helvetica. Not very
satisfactory but there is no documentation that I could find that
explains how the metrics are to be interpreted.
Is this what you're referring to?
--Graham
_______________________________________________
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>) |