mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:17:39 +00:00
([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:
parent
ae1efab51a
commit
7b1a2a50b5
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue