Re: How to change default font for NSTextView?
Re: How to change default font for NSTextView?
- Subject: Re: How to change default font for NSTextView?
- From: Douglas Davidson <email@hidden>
- Date: Wed, 13 Feb 2002 09:40:20 -0800
On Wednesday, February 13, 2002, at 04:27 AM, Manfred Lippert wrote:
how can I set the default font of an NSTextView?
In my program it is always set to Helvetica, but it would fit better to
the
rest of the system if it was Lucida Grande.
The default font for text that has no font attribute set is 12-pt
Helvetica. However, it is always possible for you to set the font or
fonts for any text, by calling the appropriate NSMutableAttributedString
methods on your text storage. Given a textview, you can call the NSText
method setFont: (always check the superclass) which will set the font
for the entire text and also in the typing attributes, which determine
the attributes to be applied to newly typed-in text. You can also set
the typing attributes directly, if that is what you want. If your
textview does not allow rich text, then after you set the font the user
will not be able to change it. If your textview does allow rich text,
then the user can change the font. Also bear in mind that characters
that cannot be displayed in the font you choose will be displayed in
some other suitable font.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.