Sublime Forum

[ST4] [Linux] Font from Preferences.sublime-settings is not detected

#1

In my preferences, I have
“font_face”: “CMU Typewriter Text”,

When ST4 is loading, I get
font face "CMU Typewriter Text" could not be found, defaulting to "Monospace"
shown in ST Console.
However, the font is available for other applications:
% fc-list |grep ‘CMU Typewriter Text’
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunbtl.otf: CMU Typewriter Text:style=Light
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunvi.otf: CMU Typewriter Text Variable Width:style=Italic
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmuntb.otf: CMU Typewriter Text:style=Bold
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmuntx.otf: CMU Typewriter Text:style=BoldItalic
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunbto.otf: CMU Typewriter Text:style=LightOblique
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunit.otf: CMU Typewriter Text:style=Italic
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunvt.otf: CMU Typewriter Text Variable Width:style=Medium
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmuntt.otf: CMU Typewriter Text:style=Regular
/usr/share/texmf-dist/fonts/opentype/public/cm-unicode/cmunst.otf: CMU Typewriter Text:style=Oblique

Which settings am I overlooking?

0 Likes

#2

Does “font_face”: “CMU Typewriter Text Regular” work? ST may need some hint which “style” / “variant” to use.

0 Likes

#3

It does, thank you

Shouldn’t it be in the documentation?

I tried specifiyng"font_options":["Regular"], but it didn’t work.

0 Likes

#4

It’s about how font selection works. It seems to be a quite tricky and often “none-standardized” way how fonts define their variants and how OS APIs expect names to be provided.

Maybe a feature request could result in a little hint being added to docs.

But I guess there’s no standard answer which provides hints about exact names to be used as those may differ between fonts.

0 Likes

#5

Those font files are part of your latex distribution. Are you sure that those directories are included in the path where your operating system for font files searched. Can you use those font files and see CMU Typewriter Text in applications outside of latex, e.g. Word, LibreOffice Writer, …? If not than those font files aren’t available for your operating system and ST can’t find them.

0 Likes

#6

I can use this font in Libreoffice and other applications, as shown by fc-list in the original post

0 Likes