• 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: underline fonts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: underline fonts


  • Subject: Re: underline fonts
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 24 Apr 2003 15:35:08 -0700

On Thursday, April 24, 2003, at 3:15 PM, John Nairn wrote:

I looked in NSFont, NSFontManager, and all attributed strings but can not find a way to underline fonts? There is a menu command in TextEdit to underline, but what it the method?

Fonts are not underlined; characters are underlined. One sets an attribute, NSUnderlineStyleAttributeName, on the characters to be underlined. See the AppKit's NSAttributedString.h for the details. The first responder method is underline:, as one might expect, defined on NSText, the superclass of NSTextView. This corresponds to a user-initiated underlining of the current selection; programmatic underlining is probably best accomplished by setting attributes on the NSTextStorage.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >underline fonts (From: John Nairn <email@hidden>)

  • Prev by Date: Re: natural languages
  • Next by Date: Quit from a Button
  • Previous by thread: underline fonts
  • Next by thread: Quit from a Button
  • Index(es):
    • Date
    • Thread