Hi, I’ve recently switched from openSUSE Tumbleweed to Fedora 41 KDE, and noticed a peculiarity with the fonts in Firefox. On my old system, after I’d installed the MS Core Fonts (Arial, Verdana, etc,) the text would be in said font on Firefox. I’ve done the same here, only the system refuses to use the corefonts! I’ve deleted every “substitution” config file in both /etc/fonts/conf.d/ and /usr/share/fontconfig/conf.avail/, set “gfx.font_rendering.fontconfig.max_generic_substitutions” in Firefox to 127, and ran “sudo fc-cache -f -v” alongside restarting Firefox after each change but to no avail.
For example, a web page that asks for “arial, helvetica, sans-serif” instead goes straight to sans-serif, which instead of the browsers fallback (helvetica), it displays “Vazirmatn”!
Yeah, my question was going to be whether you’re using a Flatpak version of Firefox.
Flatpak does use host fonts, but it doesn’t use any of the host fontconfig xml files (because the format is unstable, so it could break when Flatpak and the host have different versions of fontconfig).
It looks like there is a font cache at ~/.cache/fontconfig, but you said you ran fc-cache with sudo. Maybe you need to run it without sudo? Also, you might want to double-check that all the permissions are correct. I’m not sure if SELinux permissions would matter, but I’d run restorecon -rv ~/.fonts to be sure.
ran fc-cache without sudo, still nothing. Interestingly, when i ran restorecon, I got this:
“restorecon: lstat(/home/*****/.fonts) failed: No such file or directory”
Well it depends on where you put the fonts of course. For systems where I’m the lone user, I usually copy them to ~/.fonts. (TIP: use cp, not mv so the SELinux permissions will get set correctly.)
I cp’d them to /usr/share/fonts/, could that be part of the issue? The Font Management tab in KDE’s System Settings identifies them, same goes for GIMP.
Copied it and did some more digging, and found out this only happens with some websites. One shows the same problems I mentioned, but another displays the fallback serif and sans-serif perfectly fine. Another site seems to have problems displaying Verdana.
I guess it’s possible those specific pages/websites are doing something special with their font handling that is overruling your configuration (e.g. they might be embedding the fonts with the page). That seems unlikely though, especially if you are seeing it across several different websites. Sorry, I don’t know.
Did some more digging, and turns out I was partially wrong: the issue doesn’t occur on any mediawiki-based website, but occurs on every other site. Not to mention, when I unchecked the “Allow pages to choose their own fonts, instead of your selections above” box inside Firefox’s settings, the fallbacks were still incorrect.