mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 11:00:59 +00:00
Fixed keyed decoding of NSFont to fall back to a standard font only if
the named font was not found. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30499 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
69cd10b709
commit
f235cc977a
2 changed files with 22 additions and 18 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSFont.m (-initWithCoder:): Fixed keyed decoding to fall
|
||||||
|
back to a standard font only if the named font was not found.
|
||||||
|
|
||||||
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSTextView.m (NSTextViewUndoObject, -performUndo:,
|
* Source/NSTextView.m (NSTextViewUndoObject, -performUndo:,
|
||||||
|
|
|
@ -1322,6 +1322,9 @@ static BOOL flip_hack;
|
||||||
float size = [aDecoder decodeFloatForKey: @"NSSize"];
|
float size = [aDecoder decodeFloatForKey: @"NSSize"];
|
||||||
|
|
||||||
DESTROY(self);
|
DESTROY(self);
|
||||||
|
self = RETAIN([NSFont fontWithName: name size: size]);
|
||||||
|
if (self == nil)
|
||||||
|
{
|
||||||
if ([aDecoder containsValueForKey: @"NSfFlags"])
|
if ([aDecoder containsValueForKey: @"NSfFlags"])
|
||||||
{
|
{
|
||||||
int flags = [aDecoder decodeIntForKey: @"NSfFlags"];
|
int flags = [aDecoder decodeIntForKey: @"NSfFlags"];
|
||||||
|
@ -1339,10 +1342,6 @@ static BOOL flip_hack;
|
||||||
return RETAIN([NSFont titleBarFontOfSize: size]);
|
return RETAIN([NSFont titleBarFontOfSize: size]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self = RETAIN([NSFont fontWithName: name size: size]);
|
|
||||||
if (self == nil)
|
|
||||||
{
|
|
||||||
self = RETAIN([NSFont systemFontOfSize: size]);
|
self = RETAIN([NSFont systemFontOfSize: size]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue