New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

setting font size


Post Reply New Thread Subscribe

 
Thread Tools
rethish

 
Member Since: May 01, 2009
Posts: 1
rethish is on a distinguished road

rethish is offline
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 addItemsWithTitlesath];

I use to set font using :
NSFont *font = [NSFont fontWithNamefontList titleOfSelectedItem] size[fontSize titleOfSelectedItem] doubleValue]];

NSRange selectedRange= [textView rangeForUserCharacterAttributeChange];
[textView setFont:font range:selectedRange ];

This works properly if the selected text is composed of single font.
But if i select the text which is composed of multiple fonts, then font of entire text is set to the font, that is last selected from the popupbutton.


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

Thank you in advance

Rethish
QUOTE Thanks

Post Reply New Thread Subscribe


« finding and installing indivdial libs | How to navigate code in XCODE »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Viewing Font Size in Mail JamesLJ OS X - Apps and Games 4 06-27-2010 06:20 AM
Mac email font size soccerphysio Switcher Hangout 2 09-17-2008 10:55 PM
Setting default font in Keynote presenter notes bpwhistler OS X - Apps and Games 2 01-18-2008 03:00 PM
PC's easier to change browser font size?? tkjazzer Switcher Hangout 4 12-08-2006 11:26 PM

All times are GMT -4. The time now is 02:22 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?