Dealing with antialiasing in flatpaks

a months or so ago, freedesktop and Gnome flatpak runtimes updated to a buggy version of fontconfig that always uses subpixel antialiasing.

this makes text harder to read (due to a lot of colors) and also quickly causes me eye fatigue.

in GTK4, subpixel antialiasing doesn’t work in native widgets, but Epiphany and Console are still affected by this issue even though they use GTK4 because they embed VTE and WebKit.

this has since been quickly fixed upstream and in distros, but flatpaks haven’t updated for a long time.

what i’ve tried:

using a custom stylesheet in Epiphany to disable antialiasing completely

this doesn’t look good, but still much better than rgba because it doesn’t hurt my eyes.
unfortunately it can break some websites, such as Element.

just modifying files in /var/lib/flatpak

this fixes the issue for epiphany, but some programs still behave as if they had that font config
updates or flatpak repairs will undo these modifications.

using gnome’s zoom with grayscale

it makes gnome-shell use software rendering, which makes it use much more power.
also gnome forgets that setting after reboot, so i after rebooting i have to open settings > accessibility > zoom > color effects, and slide the saturation option higher and back to 0 for it to take effect.
it also makes like the whole desktop grayscale

placing a config in ~/.config

doesn’t work

asking developers

gnome maintainers tell me to ask freedesktop developers. freedesktop developers ignore my messages on their matrix channel, and the issue on gitlab hasn’t received any comments yet

does anyone know what can i do to be able to use my computer without hurting eyes? should i use distro packages for now instead?

1 Like

First of all, its not that someone told you to ask other people, but rather that’s the correct place to fix the issue, a bunch of the fdo-sdk maintainers are gnome and kde developers too. Second, You opened 2 very very vague “Please update a thing” issues without any examples or reproducers or version numbers. It was “this works on some distro I tried but not with flatpaks”. That’s not really actionable. Also asking in the matrix room doesn’t entitle you to a response, and I think it was also during the weekend. Most likely nobody was online or could figure out what the issue was.

Regardless, this is a volunteer project, we are already trying hard to keep up already and things like this are not making any more likely anyone will want to look into your pet bug.

this post is asking if there’s a way to properly fix the issue at least for myself before the release happens, not asking for a release
please don’t respond in such way without looking, the original report was linked in the issue, which was also linked in matrix, the “pet bug” affects how every letter in every web page is shown on most computers.

You’d have to build your own runtime. That’s possible but certainly not straightforward. Wouldn’t it be a lot easier to submit a merge request to update to the version of fontconfig you want? It should be a one-line change in elements/components/fontconfig.bst. Just change the ref line at the bottom. Currently master branch has 2.14.2, the latest version, while the 22.08 branch used by current GNOME runtimes has 2.14.1. So presumably you’re looking for the update to 2.14.2? (I’m not sure, because you have not yet specified the desired version.)

Anyway, steps:

  • Update release/22.08 branch to 2.14.2. You can probably just cherry-pick the change from the master branch.
  • Update GNOME master, 44, 43 runtime versions to newer freedesktop-sdk (release team does this regularly, so you don’t have to)

thank you so much!
would it rebuild the entire system or just fc if i rebuild it myself for now?
sorry, i didn’t know the fdo sdk actually maintains separate versions, i thought it just releases from master once in a while :sweat_smile:

You would have to rebuild everything that cannot be downloaded from artifact cache. I’m not sure why you’re more interested in rebuilding your own custom local runtime (not easy, not intended for end users) rather than fixing the bug for everyone (which is actually easy). Either one of us could have submitted a merge request with less effort than has been spent on this Discourse thread so far; I almost did yesterday, but decided not to after looking at the state of my to-do list.

Here you go.


thank you!!
i just wanted to first test it locally if it’s possible and builds successfully on that branch, and fixes it
but there’s a CI which it found a problem (added public function) in 68 minutes. would probably be slower on my laptop :confused:

:flushed: sorry, this was not an upstream update for me, debian updated to a patched 2.14.1:

please can someone who uses a distro with 2.14.2 (e.g. Arch) check if it’s fixed in that version?

Yeah so unfortunately the update to 1.14.2 for 22.08 (corresponding to GNOME 43 and 44) is rejected because it’s not forwards-compatible with 1.14.1, so we’ll have to find some other way to make this configuration change. Removing a particular file is possible, but I’m not planning to spend more time on it myself, sorry.

It will be fixed in the GNOME 45 runtime, though.

thank you for having your effort on this!
if removing the file would be the solution, would removing it in gnome sdk instead of fdo be more appropriate, since gnome has its own font configuration using portals and doesn’t generally support subpixel antialiasing in new programs?

No, any changes need to be made in freedesktop-sdk.

I found the patch from upstream and proposed it here.

Interestingly, I also found you had commented on the original fontconfig issue report. A link to that could have made this all much simpler. :wink:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.