PDA

View Full Version : fontsize cannot be changed .. why?




rethish
Jan 19, 2009, 01:31 AM
hi all,

I am totally fedup with managing the text in the textview. I want to set the font size alone .how can i do it ? please help

If ever i use to set the font ,i use the setfont:(nfont*)fontobj method,here i create a font object,[NSFont fonwithname: size: ]. This works perfectly for setting the font but only partially for setting the size.

i.e. i can only set fontsize of a particular font.

actually i need to set the fontsize for the various fonts which is associated with the text.

[for eg:i needapen.
here this sentence contains various font styles. If i select all the word and select a particular size then, the complete word's size must change and if i select some part of that sentence and select a particular size that part's size must change..]


please consider this

thank you

regards..

rethish



BorgCopyeditor
Jan 19, 2009, 09:05 AM
You need to read this guide (http://developer.apple.com/documentation/Cocoa/Conceptual/AttributedStrings/AttributedStrings.html) if you're going to use NSFont and the like.

Another possible approach is to put everything you want in a WebView and use HTML and CSS to style it. That may ultimately be simpler depending on what you need and what you know, but it comes with a lot of overhead (i.e., learning about how WebView and associated classes work).

rethish
Jan 19, 2009, 09:45 PM
thankyou for considering my post

Let me try it.

thankyou