Author: mlytwyn
Date: Wed Jul 22 17:40:43 2015
New Revision: 38829
URL: http://svn.gna.org/viewcvs/gnustep?rev=38829&view=rev
Log:
Renable missing font hack with defaults key GSDefaultForMissingFont set to font
name to use
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/NSFont.m
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSFont.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSFont.m?rev=38829&r1=38828&r2=38829&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSFont.m (original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSFont.m Wed Jul 22
17:40:43 2015
@@ -864,21 +864,31 @@
}
}
-#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]);
- }
- }
-#endif
+ // 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]);
+ }
+ }
+ }
if (fontInfo == nil)
{
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs