You are not logged in.

#1 2019-03-16 23:24:24

raul_l
Member
From: Amsterdam
Registered: 2014-11-04
Posts: 58

[Solved] How to change GTK fonts in KDE?

When I open Emacs or Gnome-terminal, both of which are GTK applications, they appear huge. The reason is that they are using the Source Code Pro font with font size 20 (I can see that by opening Emacs -> Options -> Set Default Font). I have looked into "System Settings -> Application Style -> GNOME/GTK Application Style" and edited the Font variable but this has no effect. I've also looked into /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml where under the key "monospace-font-name" it says <default>'Source Code Pro 10'</default>. I have tried editing this line but don't know how to apply the change.

Which tools should I use in KDE for editing the font configuration of GTK applications?

Last edited by raul_l (2019-03-17 14:58:02)


Raul Laasner

Offline

#2 2019-03-17 06:41:06

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 591

Re: [Solved] How to change GTK fonts in KDE?

You can change it with gsettings.
Assuming you have properly configured default fonts (for the console font, run just the first one):

gsettings set org.gnome.desktop.interface monospace-font-name 'Monospace 11'
gsettings set org.gnome.desktop.interface document-font-name 'Sans 11'
gsettings set org.gnome.desktop.interface font-name 'Sans 11'

After that if you don't need them, you can uninstall the cantarell-fonts and adobe-source-code-pro-fonts packages and instruct fontconfig to replace them with other fonts. E.g.:

...
 <alias>
  <family>Cantarell</family>
  <prefer>
   <family>sans-serif</family>
  </prefer>
 </alias>
 <alias>
  <family>Source Code Pro</family>
  <prefer>
   <family>monospace</family>
  </prefer>
 </alias>
...

Offline

#3 2019-03-17 14:57:43

raul_l
Member
From: Amsterdam
Registered: 2014-11-04
Posts: 58

Re: [Solved] How to change GTK fonts in KDE?

Thank you! Using gsettings worked perfectly. It seems I can't remove the Adobe fonts because they're required for some other packages since recent update but that's fine.


Raul Laasner

Offline

#4 2019-03-17 15:41:57

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 591

Re: [Solved] How to change GTK fonts in KDE?

Since it's just a font, you can remove it ignoring the dependencies with "-Rdd". https://wiki.archlinux.org/index.php/Pa … g_packages

Offline

Board footer

Powered by FluxBB