Re: NSTextView font for inserted text
Re: NSTextView font for inserted text
- Subject: Re: NSTextView font for inserted text
- From: "I. Savant" <email@hidden>
- Date: Sat, 3 Feb 2007 12:46:49 -0500
Caleb:
You'll want to search for -typingAttributes and -
setTypingAttributes: in the documenation.
--
I.S.
On Feb 3, 2007, at 4:08 AM, Caleb Cannon wrote:
How can I determine the font of text a user is typing into an
NSTextView? Using [NSTextView font] only returns the default font
of the view. ie.
NSLog(@"Font: %@", [self font]);
gives
FontTest[16529] Font: "Helvetica 12.00 pt. P [] (0x003ce6d0)
fobj=0x0034ef60, spc=3.33"
regardless of what is actually going on in the view. [[NSTextView
textStorage] font] gives the same thing. Finally, retrieving the
font of the text just before the insertion point is not a good
option as the user may have changed the font before entering any text.
-Caleb
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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