mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Rely on the system’s default monospaced font rather than Menlo
Furthermore, if the user changes to the default monospaced font then we do not store its name in settings (given that it’s default).
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
theme = '766026CB-703D-4610-B070-8DE07D967C5F'
|
||||
fontName = 'Menlo-Regular'
|
||||
fontSize = 12
|
||||
encoding = "UTF-8"
|
||||
|
||||
|
||||
@@ -283,9 +283,11 @@ private:
|
||||
|
||||
- (void)changeFont:(id)sender
|
||||
{
|
||||
if(NSFont* newFont = [sender convertFont:_textView.font ?: [NSFont userFixedPitchFontOfSize:0]])
|
||||
NSFont* defaultFont = [NSFont userFixedPitchFontOfSize:0];
|
||||
if(NSFont* newFont = [sender convertFont:_textView.font ?: defaultFont])
|
||||
{
|
||||
settings_t::set(kSettingsFontNameKey, to_s([newFont fontName]));
|
||||
std::string fontName = [newFont.fontName isEqualToString:defaultFont.fontName] ? NULL_STR : to_s(newFont.fontName);
|
||||
settings_t::set(kSettingsFontNameKey, fontName);
|
||||
settings_t::set(kSettingsFontSizeKey, [newFont pointSize]);
|
||||
_textView.font = newFont;
|
||||
[self updateGutterViewFont:self];
|
||||
|
||||
Reference in New Issue
Block a user