File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,9 @@ - (id)init;
58
58
59
59
webPreferences = [[WebPreferences alloc ] initWithIdentifier: TMDTooltipPreferencesIdentifier];
60
60
[webPreferences setJavaScriptEnabled: YES ];
61
- NSString *fontName = [[NSUserDefaults standardUserDefaults ] stringForKey: @" OakTextViewNormalFontName" ];
62
- if (fontName == nil )
63
- fontName = @" Monaco" ;
64
- int fontSize = [[NSUserDefaults standardUserDefaults ] integerForKey: @" OakTextViewNormalFontSize" ];
65
- if (fontSize == 0 )
66
- fontSize = 11 ;
67
- NSFont * font = [NSFont fontWithName: fontName size: fontSize];
61
+ NSString *fontName = [[NSUserDefaults standardUserDefaults ] stringForKey: @" fontName" ];
62
+ int fontSize = [[NSUserDefaults standardUserDefaults ] integerForKey: @" fontSize" ] ?: 11 ;
63
+ NSFont * font = fontName ? [NSFont fontWithName: fontName size: fontSize] : [NSFont userFixedPitchFontOfSize: fontSize];
68
64
[webPreferences setStandardFontFamily: [font familyName ]];
69
65
[webPreferences setDefaultFontSize: fontSize];
70
66
[webPreferences setDefaultFixedFontSize: fontSize];
You can’t perform that action at this time.
0 commit comments