Correct. Well, I did change it in gnome tweaks tool, but that does change gsettings under the hood.
Apparently, yes. For some reason my debian oldstable has a font named “System-ui” but it appearently is just a dummy and not a real font. fontconfig then substitutes the font with what it thinks might be fitting best: That Vera font (for future reference: the command FC_DEBUG=4 anki is helpful to debug font stuff).
I did think about creating a dummy font myself, naming it “system-ui”, installing it in debian sid (development version) and see if I can reproduce the anki issue there, too. But didn’t look into that yet.
Yes, oldstable is debian 11 bullseye.
As a matter of fact, that’s exactly what happend! Nice catch! I verified using fc-match -s "System-ui" in debian sid and fontconfig now thinks the best font is NotoSans-Regular.ttf: "Noto Sans" "Regular".
I couldn’t get “Noto Sans” font to work with fontconfig yet, though. It really likes the Vera one…
Nevertheless, I think you proofed that this is a font issue in oldstable. Thanks!
Maybe symlinking the noto font with the vera font and vice versa could fool fontconfig.
But considering debian changed it’s default font in a future release (after oldstable) and there are a lot of distros (like ubuntu) which are based on debian and thus will likely have the change as well, I don’t really fell like investigating this further.
As long as the problem is fixed and not on ankis side, that is. And that does seem to be the case.
I know I said I wouldn’t investigate further, but here I am…
Debian sid has a System-ui font too. I have to remove the --bs-font-sans-serif property inherited from html:root, [data-bs-theme=light] in the stats screen or else the font won’t be applied correctly.
This is the view with a strange system font set but the css property in stats unchanged:
Does this really work with other operating systems? If even the latest debian sid (debian sid is not stable, it is the development version) has this problem, then I expect the debian derivatives (which are a lot) to have the same issue as well.
Also: if I set system-ui as the font in templates, it does in fact not use the weird font I chose:
But none of them apply that weird font I actually set (that you can see in the user interface). If I do comment out the only mention of font-family in my card template, it is applied there as well:
So… does that mean system-ui doesn’t do what it’s supposed to do? Can anyone of you maybe check on another operating system if system font is actually applied for you (maybe @Danika_Dakika or @rossgb if available)?
Other things I want to mention:
Dark vs. Light Theme makes no difference.
The following do not adjust to my system font:
A) The stats screen.
B) The deck options screen.
C) The import screen.
The following do adjust to my system font:
A) Settings screen.
B) Deck overview screen.
C) Screen that appears if you click on a deck in deck overview.
D) The about screen.
E) The export screen.
F) Deck browser (well, mostly. The buttons “fields…”, “cards…” and “preview…” do not change and the field description doesn’t change either. The contents of the fields doesn’t change but that is expected due to the fact that they are hardcoded when you create a field).
G) The addon screen.
H) The edit note types screen, including its reorder fields screen (where the font can be set, field can be set as search field ect).
I) The change profile screen.
It’s not really a fair comparison because there is no official way to change the system UI font on Windows 11 any more (you have to do registry hacking).
This is what happens e.g. in the deck overview, which works fine. E.g. it might give font-family: "Cantarell", sans-serif which is always correct, even if I change the font on my system (the “Cantarell” part changes).
But in the screens that misbehave that html font family from above is overwritten in body by
I think it is technically a better value for font-family as it gives more reliable fallbacks. It should probably be used on the deck browser screen etc. too.
I think it is just an unfortunate outcome of Linux having multiple different ways to set the default font.
e.g. If you installed KDE on your debian machine it probably will not care about gsettings. It might also use fontconfig.
If we really wanted to force it to work how you expect we could prepend self.font().family() to the bootstrap font list in python, but I’m not really a fan of that.
From a quick search Windows stopped letting you change the system font with Windows 8. They have used Segoe UI as the default since Windows Vista.
It looks like modern MacOS also does not let you change the system font (I don’t know if older versions allowed it). MacOS has used a few fonts over the years. They used Helvetica Neue back in Yosemite (10.10) but they have been using variants of San Francisco for a while now.
With Linux/BSD/??? who knows what the default will be. It entirely depends on the distro.