What is the default font of Sublime Text?

126,572

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.

default platform preferences

(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:

  1. go to View menu and select Show Console
  2. 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

Share:
126,572
Uninvited Guest
Author by

Uninvited Guest

Python new developer and enthusiast.

Updated on November 07, 2020

Comments

  • Uninvited Guest
    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
    matanster over 9 years
    On my Ubuntu linux, it looks like the default is not Monospace. The font looks different (and better) than, say, selecting Monospace in NetBeans.
  • MattDMo
    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
    matanster over 9 years
    mmmm... I see. I guess monospace is not a real/final font but something that maps to some font somewhere..
  • MattDMo
    MattDMo over 9 years
    @matt yup, you got it.
  • PaleNeutron
    PaleNeutron about 9 years
    I 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
    MattDMo about 9 years
    @PaleNeutron if you have a new question please ask it here.
  • Gerry
    Gerry almost 9 years
    That should be "Menlo-Regular" on OSX
  • MattDMo
    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
    Nikos Baxevanis over 8 years
    Very nice! And with view.settings().get('font_size') you get the font size as well.
  • Hrvoje T
    Hrvoje T over 7 years
    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 returns DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
  • Hrvoje T
    Hrvoje T over 7 years
    When I click Preferences -> Browse Packages nothing opens or happens. In Packages directory I only have User directory. No Preferences (OS).sublime-settings file. Kubuntu 16.10, ST3
  • MattDMo
    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 in Packages, it's stored in a .sublime-package archive file in Installed Packages. If you want to examine its contents, or those of any other default package, you should use PackageResourceViewer.
  • SaiKiran
    SaiKiran over 6 years
    @MattDMo I actually Like your color Theme. Can you share the name ?
  • Gabriel Staples
    Gabriel Staples about 2 years
    I'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
    Gabriel Staples about 2 years
  • Gabriel Staples
    Gabriel Staples about 2 years
    Anyway, 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
    PerseP almost 2 years
    Or go to View -> Show Console