I’m currently having an issue with font prioritization in my applications installed through flatpak after having installed fonts to my user (I had previously no fonts installed to my user account) I noticed that the Japanese in most flatpak applications I have installed started defaulting to a font called ‘BestTen-DOT’ which is a font I had installed, but I had done nothing to set it as the font or anything like that. This issue was not present in any applications installed through rpm or any appimages and also for some reason libadwaita applications, unsure of why that last one is. While my other applications defaulted to ‘Noto Sans CJK JP’ for Japanese (which is the default on KDE) for some reasons installing other Japanese fonts seem to give them higher priority. I did try to delete ‘BestTen-DOT’ to see what would happen and that only caused it to switch to some other font I had installed which I did not want to set as the font either. A way I found to solve it was to delete all my user installed fonts, which caused it to go back to the default ‘Noto Sans CJK JP’, but this is obviously not a good solution.
I did find an non-ideal workaround for this issue, but it does cause me some other minor issues which I can deal with, but I found putting this into ~.config/fontconfig/conf.d/ did solve the issue mostly.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family" qual="any">
<string>sans</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK JP</string>
</edit>
</match>
<match target="pattern">
<test name="family" qual="any">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans CJK JP</string>
</edit>
</match>
</fontconfig>
If I had to guess the default CJK fonts which should be top priority by default just are not in Flatpak and installing any font automatically places it above for some reason, but I really have no clue.
I wanted to file a bug report for this, but I have no idea who to report this issue to, I don’t know if it’s a problem with Fedora, KDE or Flatpak or where to report it, so I’m trying my luck here.