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


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

  • Prev by Date: Re: underlining
  • Next by Date: RE: NSTableView Popup Column issue
  • Previous by thread: Re: underlining
  • Next by thread: Needed : set class for Cocoa
  • Index(es):
    • Date
    • Thread