What is the default font of Sublime Text?
Solution 1
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.
Solution 2
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.
Solution 3
Yes. You can use Console of Sublime with (Linux):
Ctrl + `
And type:
view.settings().get('font_face')
Get any setting the same way.
Solution 4
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"
Solution 5
The default font on windows 10 is Consolas
Comments
-
Uninvited Guest over 3 years
I was looking and could not find an answer on this one. Which is Sublime Text's default font type?
-
matanster over 9 yearsOn my Ubuntu linux, it looks like the default is not Monospace. The font looks different (and better) than, say, selecting Monospace in NetBeans.
-
MattDMo over 9 years@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. -
matanster over 9 yearsmmmm... I see. I guess monospace is not a real/final font but something that maps to some font somewhere..
-
MattDMo over 9 years@matt yup, you got it.
-
PaleNeutron about 9 yearsI have a quite similar question:'what is the default font of the "build result plane"? And where to set it? ' In my PC, the font is not monospaced and bother me so much.
-
MattDMo about 9 years@PaleNeutron if you have a new question please ask it here.
-
Gerry almost 9 yearsThat should be "Menlo-Regular" on OSX
-
MattDMo almost 9 years@Gerry Menlo-Regular is the name of the font file, the font's name is Menlo and the style name is Regular (as opposed to Italic or Bold or Narrow or whatever).
-
Nikos Baxevanis over 8 yearsVery nice! And with
view.settings().get('font_size')
you get the font size as well. -
Hrvoje T over 7 yearsThis 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 T over 7 yearsWhen I click
Preferences -> Browse Packages
nothing opens or happens. In Packages directory I only have User directory. NoPreferences (OS).sublime-settings
file. Kubuntu 16.10, ST3 -
MattDMo over 7 years@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
. -
SaiKiran over 6 years@MattDMo I actually Like your color Theme. Can you share the name ?
-
Gabriel Staples about 2 yearsI'm using Sublime Text 4 (Build 4126) on Linux Ubuntu 18.04. The
Packages/Default
directory (full path would be$HOME/.config/sublime-text-3/Packages/User
) no longer exists. Where are these defaults stored now? -
Gabriel Staples about 2 yearsFollow-up question I just asked: Where are the default settings, such as "font_size", stored in Sublime Text 4?
-
Gabriel Staples about 2 yearsAnyway, I guess the main takeaway is that for Sublime Text 3 and 4 you can just see the defaults by looking in the left-hand pane that opens up when you go to Preferences --> Settings.
-
PerseP almost 2 yearsOr go to View -> Show Console