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:
Marcian Lytwyn 2015-07-22 15:40:43 +00:00
parent 1c53e7f718
commit d1ea62a81e

View file

@ -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)
{