Missing font?
Missing font?
- Subject: Missing font?
- From: Matt Baker <email@hidden>
- Date: Fri, 9 Sep 2005 00:17:28 -0500
I'm trying to read an RTF file into an editor in Cocoa, and setting
the default font to a font with a particular name. I need to check to
see if the font exists (and if the fonts in the RTF exist on my
machine, since the RTF may come from another machine).
For example,
[textView setFont:[NSFont fontWithName:[plist
valueForKeyPath:@"defaultFont"] size:[[plist
valueForKeyPath:@"defaultSize"] doubleValue]]];
Will crash if the defaultFont described in the plist file doesn't exist.
How do I check if the font exists first?
Thanks,
Matt
_______________________________________________
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