You are not logged in.
Hello ^_^
I currently have a very simple conf file located at ~/.config/fontconfig/fonts.conf that is intended to set the system default font to Iosevka.
Here is the entirety of the file:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'><fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>Iosevka Term</family>
</prefer>
</alias>
</fontconfig>
The package ttc-iosevka is installed, and the various fonts appear in the output of fc-list.
I believe all the appropriate symlinks are in place for 50-user.conf to be enabled as described in this section of the wiki page for fontconfig.
Currently, the links are:
/etc/fonts/conf.d/50-user.conf > /usr/share/fontconfig/conf.default/50-user.conf
/usr/share/fontconfig/conf.default/50-user.conf > ../conf.avail/50-user.conf
with 50-user.conf being an actual file that then includes $XDG_CONFIG_HOME/fontconfig/fonts.conf
$XDG_CONFIG_HOME does resolve to ~/.config.
I have run fc-cache with -f, -v, and -r flags and nothing has changed the output of
fc-match monospace
Why is the Iosevka (or Iosevka Term specifically, I did try a version of this file that just said "Iosevka") not successfully set as the preferred monospace font? Is there another step I have to to do, or is my current setup wrong somehow?
I have a feeling I am missing something incredible obvious, but I have been unable to figure this out.
It is nearly 1am and I registered an account just to ask this so my desperation is perhaps evident T-T
Apologies for any ill-formatting, and thanks in advance if anyone can help!
Last edited by zmoney (2026-06-24 20:41:31)
Offline
https://bbs.archlinux.org/viewtopic.php … 0#p2301860
strace -f fc-match monospace | grep $HOMEOnline
Thank you for your help.
Here's what I believe to be the relevant output:
access("/etc/fonts/conf.d/50-user.conf", R_OK) = 0
access("/etc/fonts/conf.d/50-user.conf", R_OK) = 0
readlink("/etc/fonts/conf.d/50-user.conf", "/usr/share/fontconfig/conf.defau"..., 4095) = 47
newfstatat(AT_FDCWD, "/usr/share/fontconfig/conf.default/50-user.conf", {st_mode=S_IFREG|0644, st_size=542, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/fontconfig/conf.default/50-user.conf", O_RDONLY|O_CLOEXEC) = 4
read(4, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 542
read(4, "", 8192) = 0
close(4) = 0
access("/home/zinnia/.config/fontconfig/conf.d", R_OK) = 0
access("/home/zinnia/.config/fontconfig/conf.d", R_OK) = 0
readlink("/home/zinnia/.config/fontconfig/conf.d", 0x7ffcf815bee0, 4095) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/home/zinnia/.config/fontconfig/conf.d", {st_mode=S_IFDIR|0755, st_size=0, ...}, 0) = 0
openat(AT_FDCWD, "/home/zinnia/.config/fontconfig/conf.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents64(4, 0x5620d75d34d0 /* 2 entries */, 32768) = 48
getdents64(4, 0x5620d75d34d0 /* 0 entries */, 32768) = 0
close(4) = 0
access("/home/zinnia/.config/fontconfig/fonts.conf", R_OK) = 0
access("/home/zinnia/.config/fontconfig/fonts.conf", R_OK) = 0
readlink("/home/zinnia/.config/fontconfig/fonts.conf", 0x7ffcf815bee0, 4095) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/home/zinnia/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=198, ...}, 0) = 0
openat(AT_FDCWD, "/home/zinnia/.config/fontconfig/fonts.conf", O_RDONLY|O_CLOEXEC) = 4
read(4, "<?xml version='1.0'?>\n<!DOCTYPE "..., 8192) = 198
read(4, "", 8192) = 0
close(4)
access("/etc/fonts/conf.d/51-local.conf", R_OK) = 0
access("/etc/fonts/conf.d/51-local.conf", R_OK) = 0
It looks to me like the appropriate config file is read. The readlink is returning an error but that happens throughout the log, and I am not sure why, as running readlink -f /home/zinnia/.config/fontconfig/font.conf from the shell returns the correct path.
I also think the bytes from the file are being read, so maybe the issue is the formatting of my config file?
Please let me know if you have better insight ![]()
Full output if needed is here: https://justpaste.it/dtsjl
Offline
The strace was just to proof the file is read - have you seen the other thread about the drastically altered fontconfig behavior wrt generic font names?
Online
The other thread was very informative, thank you for pointing me to it. I will link it here for anyone else who stumbles upon this.
It seems the latest update of fontconfig introduced the genericfamily property to fonts which, as of today at least, is not set for many fonts, including Iosevka. fontconfig seems to default to any font with a genericfamily set over one without a genericfamily, regardless of configured user preference. Upon checking for fonts without an assigned generic family as described in the other thread, Iosevka was listed, and after manually assigning it a generic family as the other thread instructs, I was able to have fontconfig find and recognize the preference for Iosevka. Of course now that I have changed it I am not sure I really enjoy the font, but such is the nature of things I suppose
at least now I know what to do going forward.
Including my full font.conf for posterity sake since it is quite short, and might help someone in the future.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'><fontconfig>
<match target="scan">
<test name="family"><string>Iosevka</string></test>
<edit name="genericfamily" mode="assign_replace" binding="same">
<const>monospace</const>
</edit>
</match>
<alias>
<family>monospace</family>
<prefer>
<family>Iosevka</family>
</prefer>
</alias>
</fontconfig>
Offline