mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Renable missing font hack with defaults key GSDefaultForMissingFont set to font name to use
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38829 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1c53e7f718
commit
d1ea62a81e
1 changed files with 22 additions and 12 deletions
|
@ -864,21 +864,31 @@ static void setNSFont(NSString *key, NSFont *font)
|
|||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
// Testplant-MAL-2015-06-30: Certain missing fonts would cause GUI problems...
|
||||
// Is this still needed??? Omitting for testing...
|
||||
if (fontInfo == nil)
|
||||
{
|
||||
Class cls = NSClassFromString(@"WIN32Server");
|
||||
if (cls && [GSCurrentServer() isKindOfClass: cls])
|
||||
{
|
||||
// HACK FIX FOR MISSING FONT - NEEDS TO BE FIXED...
|
||||
fontInfo = RETAIN([GSFontInfo fontInfoForFontName:@"Arial"
|
||||
matrix: fontMatrix
|
||||
screenFont: screen]);
|
||||
}
|
||||
// Testplant-MAL-2015-06-30: Certain missing fonts would cause GUI problems...
|
||||
NSString *missingFontName = [[NSUserDefaults standardUserDefaults] stringForKey:@"GSDefaultForMissingFont"];
|
||||
if (missingFontName && [missingFontName length])
|
||||
{
|
||||
Class cls = NSClassFromString(@"WIN32Server");
|
||||
if (cls && [GSCurrentServer() isKindOfClass: cls])
|
||||
{
|
||||
// HACK FIX FOR MISSING FONT - NEEDS TO BE FIXED...
|
||||
fontInfo = RETAIN([GSFontInfo fontInfoForFontName: missingFontName
|
||||
matrix: fontMatrix
|
||||
screenFont: screen]);
|
||||
}
|
||||
|
||||
// In case the font for name was missing also...
|
||||
if (cls && [GSCurrentServer() isKindOfClass: cls])
|
||||
{
|
||||
// HACK FIX FOR MISSING FONT - NEEDS TO BE FIXED...
|
||||
fontInfo = RETAIN([GSFontInfo fontInfoForFontName: @"Arial"
|
||||
matrix: fontMatrix
|
||||
screenFont: screen]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fontInfo == nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue