Re: underlining
Re: underlining
- Subject: Re: underlining
- From: Eric Slosser <email@hidden>
- Date: Fri, 6 Feb 2009 13:09:49 -0500
The problem I'm really trying to solve occurs in a 'real' app. I'm
drawing to a printer port with 300 dpi, and I found that with Arial 10
bold, point size > 39, the underline gets fat enough so its top edge
intersects many of the letters, so all those intersections are skipped
(not underlined). The net effect is that the underline looks very
jagged, discontinuous, serrated, bad. See ftp://v-fx.com/public/underline/underline_bad.pdf
.
If I override NSLayoutManager, provide my own
[drawUnderlineForGlyphRange:...], and implement it by adding 50 to the
baselineOffset before calling [super drawUnderlineForGlyphRange:...],
I get the result in ftp://v-fx.com/public/underline/underline_ok.pdf.
So, I have a workaround, just bump the baseline down. But why is that
necessary? Is it a symptom of a problem elsewhere? I'd rather treat
the disease than the symptom.
Is it time to stop using NSAttributedString / NSTextStorage and go
closer to the metal?
_______________________________________________
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