You are not logged in.

#1 2021-03-31 06:41:01

Megarock90
Member
Registered: 2012-01-18
Posts: 66

Help with japanese fonts in gtk apps in Plasma desktop

tldr: gtk apps are ignoring my fonts.conf setting and choosing some font I cant even find installed.

So I'm using japanese fonts on a western locale. But some days ago my gtk programs (basically firefox and thunderbird) decided they wanted to use another font which is absolutely terrible for readability. Everything else, uses the specified font.
On my fontconfig I have set this

<!-- Default font for the ja_JP locale (no fc-match pattern) -->
 <match>
  <test name="lang" compare="contains">
   <string>ja</string>
  </test>
  <edit mode="prepend" name="family">
   <string>M+ 2p</string>
  </edit>
 </match>

Removed all other japanese fonts in order to find which was causing it but it still shows up, I don't even know from where they are pulling this font.

fc-list :lang=ja
/home/cfsa/.fonts/mplus-2p-black.ttf: M+ 2p,M+ 2p black:style=black,Regular
/home/cfsa/.fonts/mplus-2p-bold.ttf: M+ 2p:style=bold
/home/cfsa/.fonts/mplus-2p-light.ttf: M+ 2p,M+ 2p light:style=light,Regular
/home/cfsa/.fonts/mplus-2p-thin.ttf: M+ 2p,M+ 2p thin:style=thin,Regular
/home/cfsa/.fonts/mplus-2p-regular.ttf: M+ 2p:style=regular
/home/cfsa/.fonts/mplus-2p-heavy.ttf: M+ 2p,M+ 2p heavy:style=heavy,Regular
/home/cfsa/.fonts/mplus-2p-medium.ttf: M+ 2p,M+ 2p medium:style=medium,Regular

Offline

#2 2021-03-31 11:12:02

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Help with japanese fonts in gtk apps in Plasma desktop

There was a 'fontconfig' package update that reorganized things in /etc/fonts/. That's probably related to your new problem. Maybe if you look into /etc/fonts/conf.d/ folder you can see something suspicious.

Last edited by Ropid (2021-03-31 11:12:44)

Offline

#3 2021-03-31 13:33:08

Megarock90
Member
Registered: 2012-01-18
Posts: 66

Re: Help with japanese fonts in gtk apps in Plasma desktop

So checked and sure enough there are some files there, (actually simlinks to /usr/share/fontconfig/conf.avail) but I don't know how to proceed.
There are a couple that grabbed my attention, called 40-nonlatin.conf and 65-nonlatin.conf.
40 it says that is to "Set substitutions for non-Latin fonts" and 65 to "Set preferable fonts for non-Latin". Tried removing any mention of non-installed fonts and even removing the files to no avail (backups were made, ofc)

Small update:
Followed the instructions regarding font replacements in firefox and now at least page contents have the intended fonts. Ui elements (tabs, bookmarks, addressbar) are still using the unreadable one.
Isn't there a gtk setting somewhere I can change to get that same result?

Edit 2:
Same workaround also worked on thunderbird.

Last edited by Megarock90 (2021-03-31 14:24:23)

Offline

Board footer

Powered by FluxBB