KDE fonts settings got ignored by GTK programs

Bilingual friend of mine, which i've just turned to KDE have noticed that in some programs fonts are messed up / wrong looking.

I've done some tests to determine it's a problem of both KDE settings and manual files forcing fonts gets completely ignored by GTK programs like Firefox or Sulbime text 3, for example.

Usually KDE of latest editions should inherit GTK fonts from what you've set in KDE Settings - Fonts (qt), on Manjaro it's Noto and for a good reason of being super multi-lingual. But now if you run let's say Firefox, although Noto is set in settings - you'll get something like Bitstream vera in Firefox preferences picked up as default (and on actual pages it can be way more messy than just Bitstream vera, a lot of times it's multiple font faces of different sizes, where usually it should be rendered as one).

So i tried to force GTK fonts, by manually setting them, tested on Stable / Testing / Unstable branches.

I've tried all the logical things outside of KDE's settings program i could think of...which are:

gsettings

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

$HOME/.gtkrc-2.0

gtk-font-name="Sans 10"
gtk-document-font-name="Sans 10"
gtk-monospace-font-name="Monospace 10"

$HOME/.config/gtk-3.0/settings.ini

gtk-font-name=Sans 10
gtk-document-font-name=Sans 10
gtk-monospace-font-name=Monospace 10

Then to apply all that i run

qdbus org.kde.KWin /KWin reconfigure

And reboot just in case...

So nothing helps, GTK programs still doesn't inherit Noto font (i've also tried to set Noto Sans 10 directly, bypassing generic faces like 'Sans 10', which should follow system settings).

Also i've noticed few things:

  • If you try to leave System settings - Fonts page without ever changing anything - it will always ask to apply settings (but that if i remember correctly should be some upstream bug mentioned before in Nate's blog)
  • After reboot both .gtkrc-2.0 and .config/gtk-3.0/settings.ini changes their values of gtk-font-name to:
gtk-font-name="Noto Sans,  10"

Here's picture of what i mean:
Screenshot_20200520_185307


This doesn't happen at all on KDE git, in there GTK font settings works like usual and follows whatever you set in system (also doesn't ask to apply settings constantly).

@oberon unless there is something i've missed in my casual debug, i would really appreciate if you could fix that problem and fast-track affected packages on all branches. :face_with_monocle:

As usual - i can help with testing / debug.

1 Like

It is working fine for me. The only thing I have different from stable is that I pulled the framework 5.70.1 changes forward.

Can you see if it is fixed for you if you install kio, plasma-workspace and ktexteditor from unstable?

Yeah i've tested it 15 minutes ago on fully up to date Unstable branch as well, maybe my mirror is not synced to latest changes, can you please mention versions of those packages?

kio 5.70.1-1
ktexteditor 5.70.1-1
plasma-framework 5.70.1-1

To be fair, that could be unrelated. I just noticed font changes work me in Firefox and that is the only difference I am aware of.

1 Like

Yep, same versions of those...

Well then i don't know, probably not related, only difference i could think of is that maybe we had different starting points, both me and my friend started from latest stable iso (manjaro-kde-20.0.1-200511-linux56.iso.), then for tests i've switched to Testing, updated had same tests...

Then same with Unstable.

It is a vm, I can blow it away and replace it with the latest. Give me a few minutes to test that.

2 Likes

check also
https://www.phoronix.com/scan.php?page=news_item&px=HarfBuzz-Hinting-Woe
https://www.phoronix.com/scan.php?page=news_item&px=FreeType-2.10.2-Released

see version
pango harfbuzz and freetype versions

Also happens on latest Gnome Stable edition too (just tested live on VM), probably other editions as well..

Screenshot_20200520_190403

1 Like

OK, here are the results in a clean install. The only thing I did was update the system.

Here is how firefox starts out:
image

Here it is after a font change via System Settings:
image

Am I testing the wrong thing?

Preferences - General - Fonts
Like that:

In case of Firefox it's default fonts should be picked up and inherited from system settings as Noto (as intended)

In case of Sublime text 3 (which by default also inherits System settings for it's documents) kinda like that too, for example now if you try to see some document with english / russian like my friend did, you'll see some jumpy mess with different fonts..

Example:
Screenshot_20200520_191621

1 Like

OK, so I do see that. I also tested on Arch, nixos and Solus. All show the same behavior even though they are using different versions of KDE(The nixos machine is still on 5.17.x with the old gtk settings).

Are you sure that is supposed to change?

2 Likes

Yeah i'm 100% sure:

  1. It wasn't like that before
  2. It works well as intended on our KDE dev (git or whatever it called), try it https://osdn.net/projects/manjaro-community/storage/kde-dev/20.0/

P.S. Kinda amazed it's also the case for Arch, nixos, Solus though, but since Gnome is also affected...Well we have a problem :upside_down_face:

1 Like

This is how it is on Stable, and how it should be:
firefox_fonts_stable

1 Like

Yeah exactly, but...What the hell, why you have it working?
Started from older iso initially?

It seems latest iso is messed up somewhere :expressionless:

But if you change the fonts in system settings, do they change there? Isn't that what we are testing?

Ah yes, that's why! :man_facepalming: I installed on this machine from ISO version 19 something.

Yep, they should change (might require logout / reboot, but usually don't)

@kresimir so, they change with System - Fonts change and inherit correctly, right?

Here is the kde-dev live ISO:
image

They don't change, they just happen to start out with the default you like.

I can't find any example of these changing on any distro. Can you give me an example of someplace they do change?

Nope, they do not change, just tested it, with a reboot. They are just set on sane defaults, i.e. Noto fonts.

1 Like

Well, at least that is right direction, since it's multi-lingual font including CJK...

I think we should try some our older isos to see correct behavior, i'll try to find one...Probably something radical have changed lately

1 Like

Forum kindly sponsored by