Getting font attributes from an NSTextView
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