Re: FontWithName Re: How to change default font for NSTextView?
Re: FontWithName Re: How to change default font for NSTextView?
- Subject: Re: FontWithName Re: How to change default font for NSTextView?
- From: Aki Inoue <email@hidden>
- Date: Wed, 13 Feb 2002 14:45:45 -0800
You can use -[NSFontManager availableFonts]. It returns an array of
fontnames.
Aki
On Wednesday, February 13, 2002, at 02:17 PM, Zac Belado wrote:
On 2/13/02 12:19 PM, "Douglas Davidson" <email@hidden> wrote:
I believe the problem here is that the system font is not actually
named
"Lucida Grande"; that is the display name, not the internal name used
by
fontWithName:.
Is there any way to check for the availability of a specific font name
before attempting to create an NSFont object with that name?
If you try something like
[NSFont fontWithName:@"HelveticaBoldOblique" size:12]]
You get a nasty error and a possible crash. I'd like to be able to
test the
name first and maybe use the system font if the name isn't correct.
--
We are born naked, wet and hungry. Then things get worse.
_______________________________________________
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.
_______________________________________________
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.