NSTextView font line height
NSTextView font line height
- Subject: NSTextView font line height
- From: Duncan Campbell <email@hidden>
- Date: Thu, 17 Mar 2005 19:13:14 +1100
Hey folks,
say i am setting the font of an NSTextView:
[myTextView setFont:[NSFont fontWithName:@"Monaco" size:10]];
this will give me Monaco font, size 10.
What if I want to have a different font:
[myTextView setFont:[NSFont fontWithName:@"Lucida Grande" size:9]];
But still have the LINE HEIGHT of the textView be the same as the first
(Monaco size 10).
I know I can do something like:
[NSFont fontWithName:@"Monaco" size:10] defaultLineHeightForFont]
but i can't figure out how to apply this to the NSTextView..
The reason I am doing this is I am trying to create a
linenumberTextView like XCode - where the line number font is smaller
than the edit-area font, but the line height is the same.
Any help, much appreciated.
D.
---------------------------------------------------------------
Duncan Campbell
http://www.duncanandsarah.com/duncan
---------------------------------------------------------------
_______________________________________________
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