• 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
Getting font attributes from an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting font attributes from an NSTextView


  • Subject: Getting font attributes from an NSTextView
  • From: Ian was here <email@hidden>
  • Date: Sun, 17 Jul 2005 17:00:30 -0700 (PDT)

I'm tring to get font information from an NSTextView.
I noticed that you can display all of the font info
like this:

NSLog( @"%@", [myTextView textStorage] );

The info displayed is what I need.

But the following code doesn't seem to provide all of
that same info:


int		textLength = [[myTextView textStorage] length];

NSLog( @"%@", [[myTextView textStorage]
fontAttributesInRange:NSMakeRange( 0, textLength )] );


I need to get the font info for each bit of text in an
NSTextView because I am trying to convert the text
into XML tags.



<font face="some face" color="00ffffff">
<text>Hello</text>
</font>


Thanks





__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting font attributes from an NSTextView
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Array question
  • Next by Date: Problems with a chain of bindings and search field
  • Previous by thread: Re: Array question
  • Next by thread: Re: Getting font attributes from an NSTextView
  • Index(es):
    • Date
    • Thread