Re: underline fonts
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.