NSTextView font for inserted text
NSTextView font for inserted text
- Subject: NSTextView font for inserted text
- From: Caleb Cannon <email@hidden>
- Date: Sat, 3 Feb 2007 01:08:08 -0800
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:
This email sent to email@hidden