You are not logged in.

#1 2020-10-15 09:04:12

Salkay
Member
Registered: 2014-05-22
Posts: 482

[SOLVED] GTK subpixel rendering broken in KDE

A recent update (perhaps in KDE?) has broken subpixel rendering in GTK apps. Here is a screenshot of Terminator

lbfW4Gv.png

And some odd-looking pipes in Firefox
MqWmHEa.png

They look totally wrong. Even if there were some misalignment of the rendering, the horizontal pixels should "add up" to black/white, but they are clearly have an overall tint.

Other applications look fine. I tried following instructions in the wiki to fix hinting in GTK apps, in the hope that this might fix subpixel rendering too, but neither fix worked. FWIW I've never needed these workarounds before. The hinting in Firefox also looks a bit spindlier than normal.

Last edited by Salkay (2020-10-16 12:48:36)

Offline

#2 2020-10-15 11:53:00

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 169

Re: [SOLVED] GTK subpixel rendering broken in KDE

I noticed bit strange rendering in firefox few days ago. I did spend more time to find more details and try to solve it but no success.
I am comparing firefox with brave or with vivaldi and firefox is bad.

I did think it is problem in firefox, but looks it is not.

Other applications looks OK. I am using Gnome but probably some application what I have installed are KDE based so I have some KDE libs installed ...

Offline

#3 2020-10-15 12:01:51

Salkay
Member
Registered: 2014-05-22
Posts: 482

Re: [SOLVED] GTK subpixel rendering broken in KDE

jancici wrote:

I am using Gnome but probably some application what I have installed are KDE based so I have some KDE libs installed

Oh okay, good to know. Maybe it's not KDE Plasma related then.

jancici wrote:

I noticed bit strange rendering in firefox few days ago.

There was a big Plasma upgrade yesterday, so I assumed it was related to that, but maybe the issues were from before that then.

I tested a few other applications that are GTK-based.

GTK3: firefox, terminator, gvim, deluge, evince, kalu, gnumeric look bad (but chromium is fine)
GTK2: gimp, pidgin look bad. I think Ardour too.
QT5: kate, nomacs, audacious, recoll were all fine
Other: libreoffice looks fine

So it almost certainly is a GTK issue.

Last edited by Salkay (2020-10-16 05:20:09)

Offline

#4 2020-10-16 09:25:23

Spike29
Member
Registered: 2020-10-16
Posts: 3

Re: [SOLVED] GTK subpixel rendering broken in KDE

Hello,

I noticed a possibly related issue on Plasma after the latest freetype2 2.10.3 update (which enabled subpixel rendering by default).
However it only affected Firefox and Thunderbird in my case, fonts in other GTK2 and GTK3 applications were fine. Here is the corresponding bug report (it's now closed).

I fixed my issue by enabling the LCD filter as described in the wiki: https://wiki.archlinux.org/index.php/Fo … LCD_filter

Last edited by Spike29 (2020-10-16 09:42:35)

Offline

#5 2020-10-16 12:48:24

Salkay
Member
Registered: 2014-05-22
Posts: 482

Re: [SOLVED] GTK subpixel rendering broken in KDE

Oh brilliant. Thank you so much for posting @Spike29! Yes, that fixed it for me too, and my eyeballs are no longer bleeding! For anyone else, simply add /etc/fonts/local.conf with the following content.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
  </match>

</fontconfig>

I can't exactly remember, but Firefox etc. look pretty similar to how they did before. However, if subpixel rendering is now enabled by default as per the comment in your bug report, I would have thought freetype should enable the LCD filter by default, as per the recommendations in the wiki.

Offline

#6 2020-10-17 12:25:49

iyanmv
Member
Registered: 2016-11-08
Posts: 26
Website

Re: [SOLVED] GTK subpixel rendering broken in KDE

Great! Thanks @Salkay for the solution. I also noticed the issue after upgrading `freetype2`. I didn't even think of a plasma related issue because I was using the beta of 5.20 for a while without issues. But when I checked the forum the first time I didn't find anything, and I also didn't have to test more things, so I just downgrade freetype2 to previous version. I also agree that maybe LCD filter should be enabled by default now...

Offline

#7 2020-10-17 22:14:06

Salkay
Member
Registered: 2014-05-22
Posts: 482

Re: [SOLVED] GTK subpixel rendering broken in KDE

Thanks @iyanmv, but all credit to @Spike29! I'm not sure how we go about discussing possible new defaults. @Spike29 opened the related bug report, but it was closed.

Offline

#8 2020-10-18 11:17:15

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 169

Re: [SOLVED] GTK subpixel rendering broken in KDE

yes, downgrading package freetype2 (2.10.3-1 => 2.10.2-1) help and now reading text in firefox is perfect :-)

but

I am checking font configuration in gnome tweak and I have checkin "subpixel (for LCD screens) in antialiasing section. Configure lcd filter in that file Is that something else?

Offline

Board footer

Powered by FluxBB