You are not logged in.
Hi guys,
I have installed Arch on mu T14s Thinkpad laptop, and I set font using fontconfig by linking the following configs:
drwxr-xr-x 2 edge33 edge33 4096 Jan 30 15:44 .
drwxr-xr-x 22 edge33 edge33 4096 Jan 30 16:45 ..
lrwxrwxrwx 1 edge33 edge33 55 Jan 30 15:44 10-hinting-slight.conf -> /usr/share/fontconfig/conf.avail/10-hinting-slight.conf
lrwxrwxrwx 1 edge33 edge33 59 Jan 30 15:44 10-scale-bitmap-fonts.conf -> /usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf
lrwxrwxrwx 1 edge33 edge33 54 Jan 30 15:44 10-sub-pixel-rgb.conf -> /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf
lrwxrwxrwx 1 edge33 edge33 58 Jan 30 15:43 11-lcdfilter-default.conf -> /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf
lrwxrwxrwx 1 edge33 edge33 45 Jan 30 15:39 50-user.conf -> /usr/share/fontconfig/conf.avail/50-user.conf
-rw-r--r-- 1 edge33 edge33 840 Jan 30 14:51 font.configfont.config has the following content:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Fallback fonts preference order -->
<alias>
<family>sans-serif</family>
<prefer>
<family>SF PRO Display</family>
<family>Open Sans</family>
<family>Droid Sans</family>
<family>Roboto</family>
<family>Tholoth</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>New York</family>
<family>Droid Serif</family>
<family>Roboto Slab</family>
<family>Tholoth</family>
<family>Noto Sans Arabic</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Jetbrains Mono</family>
<family>Inconsolata</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
</prefer>
</alias>
</fontconfig>that said, according to the arch wiki, gnome disregards font-config configuration and uses the one I can set from gnome-tweaks.
that said, shouldn't apps like alacritty and vscode be able to use the fonts set with font-config?
In order to use the fonts I want for terminal and editors (Jetbrains Mono) I needed to manually set the fonts from the specific app settins (alacrity yaml and vsccode settings).
Last edited by edge33 (2023-01-31 14:26:42)
Offline
linking the following configs
Where?
Assuming that's ~/.config/fontconfig it would be "fonts.conf", not "font.config" and you'd be better off adding this as eg. "~/.config/fontconfig/conf.d/99-defaults.conf"
fc-conflistwill print the used configuration [edit: files].
Last edited by seth (2023-01-30 17:26:35)
Offline
linking the following configs
Where?
Assuming that's ~/.config/fontconfig it would be "fonts.conf", not "font.config" and you'd be better off adding this as eg. "~/.config/fontconfig/conf.d/99-defaults.conf"fc-conflistwill print the used configuration [edit: files].
thanks for the hint, that was indeed the culprit, file being named "font.config" and not "fonts.conf".
Why would it be better to put it with a low priority number like 99- ? according to the wiki, user defined configs take precedence over the others, no?
Offline
It's less about the priority number and more about using the modular conf.d approach.
You can use either, but the modules tend to be more manageable and less prone to be steamrolled over by some DE config tool.
Offline
It's less about the priority number and more about using the modular conf.d approach.
You can use either, but the modules tend to be more manageable and less prone to be steamrolled over by some DE config tool.
so, can I use conf.d approach and prevent gnome-tweaks to override my settings even if I change those?
Offline
If you want to be absolutely sure, you'd also have to immute them w/ chattr.
But chances that gnome-teaks (or any tool) randomly messes around in conf.d are generally much lower than that it flattens fonts.conf.
Offline
If you want to be absolutely sure, you'd also have to immute them w/ chattr.
But chances that gnome-teaks (or any tool) randomly messes around in conf.d are generally much lower than that it flattens fonts.conf.
indeed, it does not mess the conf.d files, but still, it has controls over how/what fonts are displayed over font-config
Offline
Per /etc/fonts/conf.d/50-user.conf fonts.conf trumps conf.d, so I guess there's a collision.
If it's not resolvable otherwise you'd have to alter the order there.
Can you please post the fonts.conf that gnome writes and the configlet you'd like to have applied?
Offline
Per /etc/fonts/conf.d/50-user.conf fonts.conf trumps conf.d, so I guess there's a collision.
If it's not resolvable otherwise you'd have to alter the order there.Can you please post the fonts.conf that gnome writes and the configlet you'd like to have applied?
I am not sure gnome writes config files. also According to the Arch Wiki Gnome Page, it is expected that gnome font configuration done via gnome-tweaks takes control over fontconfig, so it suggets to have the same config in fontConfig and gnome-tweak, which is what I am doing.
Unless you know where gnomes stores font config files, then I could post it here. for fontconfig the only change I did is to create a fonts.conf which has the content I posted in the first message of the thread
Offline
So gnome-tweaks doesn't alter anything in ~/.config/fontconfig/ ?
The default UI font for gtk will be set in ~/.config/gtk-*/settings.ini
Otherwise you'll have to be a bit more specific about the problem you're actually facing.
Offline