Is there a way to configure font-size separately for Mac/Win? Currently I share same settings between both platforms and I have to constantly change font-size due to different screen dpi and resolutions. Size that is OK on Windows is tiny on Mac.
Platform font size setting
There might be a way to extend the features of the Camaleón plugin to do that. Right now it’s just a theme/syntax switcher:
You can do this by specifying the font size in “Preferences (OSX).sublime-settings”. The catch is that this file won’t be picked up if it’s in your User directory. You’ll want something like this:
User Platform/Preferences (OSX).sublime-settings: specifies font_size
User Platform/Preferences (Windows).sublime-settings: specifies font_size
User/Preferences (OSX).sublime-settings: doesn’t specify a font_size
Hi Jon,
I added the two files (see below) but neither seems to be having any effect. Restarted multiple times. The font settings only change if I edit User/Preferences.sublime-settings .
User Platform/Preferences (OSX).sublime-settings
{
"font_face": "inconsolata",
"font_size": 17.0
}
User Platform/Preferences (Windows).sublime-settings
{
"font_face": "consolas",
"font_size": 14.0
}
You need to ensure that you don’t specify a font size in your regular user preferences, or it’ll override the other two sources.
Has anyone managed to get this to work?
I’ve got both font_face and font_size set in the per-platform preference files and not in the user preferences; the font_size gets ignored in both cases and leaves me with text that is too small on OS X and text that is too large on Ubuntu.
Annoyingly, changing text size to Small in Ubuntu’s accessibility preferences means a setting of 12pt now looks the same on both platforms in apps like Terminal — but Sublime Text seems to ignore this setting and continues displaying 12pt at a rather large size
Two ways to get around this, if anyone is still interested:
-
Put the platform-specific settings in the Default folder, e.g.
Default/Preferences (OSX).sublime-settings
:{
“font_face”: “inconsolata”,
“font_size”: 17.0
} -
Change the settings through Python code. E.g.
\Packages\ZZZ_Platform_Specific\settings.py
:import sublime
s = sublime.load_settings(“Preferences.sublime-settings”)
if sublime.platform() == ‘windows’:
s.set(“font_face”, “Consolas”)
s.set(“font_size”, 14)
elif sublime.platform() == ‘osx’:
s.set(“font_face”, “Inconsolata”)
s.set(“font_size”, 17)
sublime.save_settings(“Preferences.sublime-settings”)