([NSFont +createObjectForModelUnarchiver:]): If there's no font of the decoded name, fall back to to the system font of the decoded size.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18452 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-01-22 11:19:08 +00:00
parent ae1efab51a
commit 7b1a2a50b5
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2004-01-22 12:16 Alexander Malmberg <alexander@malmberg.org>
* Model/GMAppKit.m ([NSFont +createObjectForModelUnarchiver:]):
If there's no font of the decoded name, fall back to the system
font of the decoded size.
2004-01-19 Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
* GNUmakefile.postamble (after-distclean): Fix deletion of config.make.

View file

@ -739,8 +739,11 @@ void __dummy_GMAppKit_functionForLinking() {}
+ (id)createObjectForModelUnarchiver:(GMUnarchiver*)unarchiver
{
return [NSFont fontWithName:[unarchiver decodeStringWithName:@"name"]
NSFont *f = [NSFont fontWithName:[unarchiver decodeStringWithName:@"name"]
size:[unarchiver decodeFloatWithName:@"size"]];
if (!f)
f = [NSFont systemFontOfSize: [unarchiver decodeFloatWithName:@"size"]];
return f;
}
- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver