• 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: NSTextView font for inserted text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTextView font for inserted text (From: Caleb Cannon <email@hidden>)

  • Prev by Date: Re: NSArrayController and variable number of NSTextFields
  • Next by Date: Re: NSArrayController and variable number of NSTextFields
  • Previous by thread: Re: NSTextView font for inserted text
  • Next by thread: Hi
  • Index(es):
    • Date
    • Thread