Sublime Forum

Default UI font in Sublime Merge

#1

Arch Linux stuff closed this issue as “not a bug” and redirected me to Sublime HQ support instead. Kinda fair, because it is probably not a distro’s problem. But I still don’t know much about font-config to judge.

https://bugs.archlinux.org/task/73069

Copying the rest of the port from the link above (just in case):

Description:

Merely installing gsfonts package messes up with Sublime Text/Merge so bad, it almost becomes an eye-bleeding experience.

I don’t know much about fontconfig, but I know that on my system without gsfonts:

  • KDE’s Fonts KCM (system settings) are set to “Noto Sans”, and
  • fc-match prints:
$ fc-match system
NotoSans-Regular.ttf: "Noto Sans" "Regular"

But after installing gsfonts:

$ fc-match system
NimbusSans-Regular.otf: "Nimbus Sans" "Regular"

Nimbus and Noto Sans screenshots of Sublime Merge:

The worst thing is, a user don’t even need to know about this font or this package. I just installed Rizin/Cutter, suspecting absolutely nothing; and after reboot I was surprised by such sudden inconvenience. Since I’m living on the edge of KDE, I wasn’t even suspecting Cutter/gsfonts for a week, hoping that it will sort itself out – just like many temporary bugs on master branch.

I believe it is unacceptable that simply instally a pack of fonts may mess up with user’s system in such way. Again, I’m not an expert in font packaging, but the current approach clearly creates very strange and hard-to-debug problems for users.

Additional info:

  • package version(s):
  • gsfonts: 20200910-2
  • config and/or log files etc.:
  • No user config on my system. The problem is reproducible in a clean environment, with a freshly created user account.
  • link to upstream bug report, if any: None

Steps to reproduce:

  1. Run $ fc-match system to ensure that default fonts are still the ones you like.
  2. Install gsfonts or anything that eventualy hard-depends on it, e.g. rz-cutter in my case.
  3. Run $ fc-match system again to ensure you defaults are already messed up.
  4. Restart Sublime Merge to see the horrible font taking over: all labels are 1-2px higher than they should be, which often makes them look mis-aligned w.r.t. to their icons or background highlight rectangle.
0 Likes

#2

Comment by Antonio Rojas (arojas) - Saturday, 18 December 2021, 01:17 GMT+3

KDE fonts KCM only affects Qt and GTK applications and is unrelated to fontconfig’s defaults. If you want to configure a default font for non-Qt and non-GTK applications you have to do it via a fontconfig conf file, otherwise it will just pick up the first match, which depends on which fonts you have installed. So this is expected.

Comment by ratijas (ratijas) - Saturday, 18 December 2021, 01:33 GMT+3

Welll… I know Arch is supposed to be for advanced users who know every single screw in their system. But I think even advanced users have better things to do other than keeping an eye on all and every transitive dependency that might override some system stuff with their shitty defaults.

I’ve been living on Arch for ~five years, and I didn’t know this could be a problem until now… which goes to say that

  1. I’m a bad admin of my own machine, and probably unworthy of Arch Linux (btw);
  2. It was perfectly fine to live for five years straight without getting into this mess, so sane defaults are a thing.

Most importantly: installing a font pack != (or least should not be possible to be equal to) changing system-wide default fonts. Is there a possible fix to this situation in any reasonable way?

Font config looks pretty scary and complicated. I don’t think KCM would ever support it, right?

Closed by David Runge (dvzrv)
Saturday, 19 February 2022, 15:59 GMT+3
Reason for closing: Not a bug
Additional comments about closing: Please bring this up with sublime’s upstream. This is neither a bug in fontconfig nor in gsfonts.

0 Likes

#3

ST on Linux is built on GTK and uses GTK’s font settings unless overidden. Are other GTK apps like gedit also affected?

0 Likes

#4

I don’t even have gedit installed. Let me check in a minute…

0 Likes

#5

I have Gedit installed. Sometimes it is named Text Editor.

0 Likes

#6

So far as I can see it, gedit is not affected. Sublime Merge isn’t changing font anymore either.

I double checked and even rebooted, but installing gsfonts on Arch Linux does not mess up with fc-match system anymore. I don’t know if this is a magical autofix, or it will break under different circumstances on another distro. At first I thought they have just lowered gsfonts priority in /usr/share/fontconfig/conf.avail/, but the package versions of both gsfonts and noto-fonts seem to be exactly the same as back then (Build Date: March 2021). Fontconfig, on the other hand, has received several updates, but I have no idea what has changed.

0 Likes