diff --git a/ChangeLog b/ChangeLog index 33b62fe15..4be98d8d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-01-22 12:16 Alexander Malmberg + + * 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 * GNUmakefile.postamble (after-distclean): Fix deletion of config.make. diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index b5ce68ae5..da062d5b9 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -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