I was looking and could not find an answer on this one. Which is Sublime Text's default font type?
5 Answers
On Linux it's Monospace
10 pt. (the exact monospace font used may vary on different Linux distributions or versions), on Windows it's Consolas
10 pt., and on OS X it's Menlo Regular
12 pt.
(The color scheme is Neon
, the syntax highlighting is from PackageDev
, and the font is Liberation Mono
This information is found in the Packages/Default
directory (where Packages
is the directory opened by the Preferences → Browse Packages...
menu option), in the Preferences (OS).sublime-settings
file where OS
is one of Windows
, Linux
, or OSX
.
You should only customize the font (or any other setting) in Packages/User/Preferences.sublime-settings
, opened by Preferences → Settings—User
, as Settings—Default
is over-written on upgrade, and also serves as a backup in case you really screw something up in your user settings. This is the case for both the main Sublime settings as well as those for extra packages/plugins.
These default fonts are the same in Sublime Text 2, Sublime Text 3, and the new version currently in development.
-
On my Ubuntu linux, it looks like the default is not Monospace. The font looks different (and better) than, say, selecting Monospace in NetBeans.– matanoxCommented Nov 12, 2014 at 23:00
-
1@matt as I mentioned, the exact font may vary. Also, Sublime uses a custom rendering engine, specifically designed to make fonts look better, so the same font may render differently in different programs. I'm not terribly familiar with NetBeans, but it may have an option to select exactly what font is used when
monospace
is chosen. This font may be different than Sublime's.– MattDMoCommented Nov 15, 2014 at 18:39 -
mmmm... I see. I guess monospace is not a real/final font but something that maps to some font somewhere..– matanoxCommented Nov 15, 2014 at 22:45
-
-
2@HrvojeT I haven't used Kubuntu (just plain Ubuntu), so I'm not sure why that menu option isn't working. The
Default
directory actually doesn't exist physically inPackages
, it's stored in a.sublime-package
archive file inInstalled Packages
. If you want to examine its contents, or those of any other default package, you should usePackageResourceViewer
.– MattDMoCommented Nov 28, 2016 at 15:17
On my system (Windows 8.1), Sublime 2 shows default font "Consolas". You can find yours by following this procedure:
- go to View menu and select Show Console
- Then enter this command:
view.settings().get('font_face')
You will find your default font.
-
7Very nice! And with
view.settings().get('font_size')
you get the font size as well. Commented Sep 18, 2015 at 6:02
Yes. You can use Console of Sublime with (Linux):
Ctrl + `
And type:
view.settings().get('font_face')
Get any setting the same way.
To add to MattDMo's answer, you can get the exact font that's used on Linux like so (the example is from Xubuntu 14.04):
$ fc-match Monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
-
This is correct. In Kubuntu 16.10 when I set font for 'Fixed width' as Monospace and then set it as DejaVu Sans Mono Book it looks the same in a settings sample preview. Not one pixel changes.
fc-match Monospace
returnsDejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
– Hrvoje TCommented Nov 28, 2016 at 8:02