Re: Repost: NSFont userFontOfSize vs setUserFixedPitchFont
Re: Repost: NSFont userFontOfSize vs setUserFixedPitchFont
- Subject: Re: Repost: NSFont userFontOfSize vs setUserFixedPitchFont
- From: Greg Titus <email@hidden>
- Date: Thu, 3 Jan 2002 22:47:41 -0800
Hi David,
The trick - or at least it used to be the trick under NeXTStep/OpenStep,
I haven't tried it lately - is to use zero for the size.
font = [NSFont userFixedPitchFontOfSize:0.0];
That will give you the default font in the default size.
Hope this helps,
--Greg
On Thursday, January 3, 2002, at 08:37 PM, David Rehring wrote:
I'm reposting this hopefully to actually get a response this time
around...
I'm creating YALA [yet another logging application] and want to
save/restore
the font the user selects for the logged text.
These two methods seem ideal [ie, setUserFixedPitchFont: saves both the
font
name and the font size to my applications 'defaults' file].
However, userFontOfSize: has the following interface:
+ (NSFont *)userFixedPitchFontOfSize:(float)fontSize
So, to 'load' the default font, I need to give it some information that
it
has already stored.
Could someone who knows explain how I'm supposed to use this API?
Am I supposed to save the font size myself in a separate defaults value?
Am I supposed to read the key that setUserFixedPitchFont: saved and
pass it
to this method?
Something behind door number 3?
Later,
--
David Rehring Psychos do not explode when light hits
Senior Software Engineer them, no matter how crazy they are...
Atimi Software, Inc.
www.atimi.com And totally insane guy!
_______________________________________________
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.