Hi,

I am developing a text editor in which I use to set the font name and font
size by selecting it from popup buttons.

Fonts obtained using the code:
                                NSArray *path=[[NSFontManager alloc]
availableFonts];
                                [fontList addItemsWithTitles:path];

I use to set font using :
                                NSFont *font = [NSFont
fontWithName:[fontList titleOfSelectedItem]  size:[[fontSize
titleOfSelectedItem] doubleValue]];
        
                                NSRange selectedRange= [textView
rangeForUserCharacterAttributeChange];
                                [textView  setFont:font range:selectedRange
]; 
   
This works properly  if the textView contain text with a single font. But
when the textView contains text with multiple fonts , the size changes with
the font that is last selected from the popup button.

I need to change fontsize of the text like this:

For eg:       hi best of Luck my friend   -------to -----   hi best of Luck
my friend



But I get like this:

i best of Luck my friend   ----to---- hi best of Luck my friend
 


How can I resize the font size without affecting the fonts in it?

Thank you in advance

Rethish
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to