Setting font size
Setting font size
- Subject: Setting font size
- From: rethish <email@hidden>
- Date: Thu, 30 Apr 2009 16:13:38 +0530
- Thread-topic: Setting font size
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:
But I get like this:
How can I resize the font size without affecting the fonts in it?
Thank you in advance
Rethish
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden