You are not logged in.
fc-match syntax is finicky, but
fc-match ui\\-monospace
should work.
Offline
Okay, that works:
$ fc-match ui\\-monospace
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
However, the text in GitHub is still not in monospace. I restarted Firefox and did a re-login, just to be sure. Same for Chrome.
Offline
Are you absolutely positively sure that it's Roboto and not Liberation Mono? (Cause that would get resolved)
=> Screenshot?
Offline
Absolutely sure. It's a sans font, and I just double-checked that it's Roboto by comparing with the Google Fonts type tester.
Offline
Browsers can have their own font resolution mechanisms, did you double check their settings? (in particular chrome pretty much ignores any other font config)
Offline
What happens if you remove Liberation from the CSS cascade?
Offline
Even
font-family: nonsense,monospace;
gives me Roboto in both Firefox and Chrome.
Once the first font in the cascade is mono or monospace, I get Source Code Pro.
Offline
Try a fresh profile or new user.
This has to be something in the browser config or maybe some extension you share among browsers.
Otherwise
pacman -Qs 'fontconf|harf|freetype|pango'
Offline
A fresh browser profile, you mean? I just installed Chromium and Opera to make sure that it has nothing to do with extensions and browser config. Same problem there.
$ pacman -Qs 'fontconf|harf|freetype|pango'
local/fontconfig 2:2.14.0-1
Library for configuring and customizing font access
local/freetype2 2.12.1-1
Font rasterization library
local/harfbuzz 5.2.0-1
OpenType text shaping engine
local/harfbuzz-icu 5.2.0-1
OpenType text shaping engine - ICU integration
local/libxft 2.3.6-1
FreeType-based font drawing library for X
local/pango 1:1.50.11-1
A library for layout and rendering of text
local/pangomm 2.46.3-1
C++ bindings for Pango
local/pangomm-2.48 2.50.1-1
C++ bindings for Pango
Offline
So "unfortunately" no stale AUR packages (though I doubt it's fontconfig related anyway)
fc-list :spacing=100 | grep -i roboto
If you make something else your default sans font (or in doubt just remove the monospace package), do you end up w/ yet another sans serif font or Liberation Mono resp. Source Code Pro (if you also remove the Liberation fonts)?
Offline
It works! I changed my default sans font, and while I was at it, I deleted the commented out part that I showed earlier in /etc/fonts/local.conf
# <match>
# <edit mode="prepend" name="family"><string>Roboto</string></edit>
# </match>
I don't know why I had this in there, but after deleting it, everything works as expected.
The interesting part is that this comment does not change the output of fc-match. But for some reason, it breaks the browsers.
Thank you all very much!
Last edited by Im3rik (2022-10-13 14:32:11)
Offline
What was the context of the match/edit, ie. the config before the fix?
fonts.conf is xml, comments go like "<!-- comment -->"
Offline
I don't know, I had it there for a long time. It probably took me a long time to notice that GitHub code is not in monospace.
I guess I edited this file in vscode, used the "auto comment" function, and just assumed that vscode chose the correct comment style.
Offline