Sublime uses system-specific methods for working with fonts; for Linux is uses fontconfig
, which is the standard way for Linux programs to work with and catalog fonts.
This is entirely a fontconfig
thing and Sublime doesnāt care. In particular, itās fontconfig
's job to find, catalog and match fonts and all Sublime does is ask it for the appropriate font.
This is why for example different distributions of Linux may seem to use a different interface font in Sublime; it just asks fontconfig
for a font named Sans
by default, and whatever font the distribution (or you) has decided to map that to is the one that gets used.
fontconfig
searches recursively through the font folders itās configured with, so you can use whatever layout you like in your fonts directory (i.e. the above in your question is fine).
fontconfig
can handle many types of fonts; ttf
, ttc
, otf
, pfa
, pfb
and woff
to name just the ones I happen to have currently installed. Sublime works with all of those font types. Presumably it would also work with bitmapped fonts as well, though Iāve never tried that myself.
The bit where you are potentially going wrong here is that the name of the file that stores the font and the name of the font itself can be radically different; you could install My Cool Font
from a file named zzz.ttf
and it would still work as expected. The name of the font comes from metadata inside of the font file itself.
The easiest way to look something like this up is to use the fontconfig
tool fc-list
. See the documentation on that if youāre interested in the gory details, but simplistically you want to do something like this in your terminal:
tmartin:dart:~> fc-list : family
Standard Symbols PS
Samyak Oriya
Lohit Kannada
Iosevka Term SS09,Iosevka Term SS09 Medium Oblique
Samyak Devanagari
Iosevka Term SS09,Iosevka Term SS09 Extralight Oblique
Iosevka Term SS09,Iosevka Term SS09 Semibold
Century Schoolbook L
DejaVu Math TeX Gyre
URW Gothic
Serto Jerusalem Outline
Estrangelo Edessa
...
...
...
This will list every font that your system knows by name. This is probably overwhelming, so you may want to send it through less
to page it or, if you know something about the name of the font you want you can grep
it out; this doesnāt require a full name, just something you think is probably in there:
tmartin:dart:~> fc-list : family | grep -i jetbrains
JetBrains Mono,JetBrains Mono Semi Light
JetBrains Mono,JetBrains Mono Medium
JetBrains Mono,JetBrains Mono Extra Bold
JetBrains Mono,JetBrains Mono ExtraLight
JetBrains Mono,JetBrains Mono Light
JetBrains Mono
All of the items are font names; some will have a comma in them if there are multiple styles. You can include any one you like. So for example any of the following are valid:
"font_face": "JetBrains Mono",
"font_face": "JetBrains Mono Light",
"font_face": "JetBrains Mono Extra Bold"
If youāre not a terminal guy, your Linux disto/window manager likely has some sort of font viewer or configuration tool that would give you the names of fonts that you could use to discover the name as well. There is also other software such as font-manager that can provide this information, though Iāve personally never used any.