You are not logged in.

#1 2025-10-19 15:23:44

luciferin
Member
Registered: 2007-05-10
Posts: 145

GNOME BGR Pixel Layout

Is anyone up for digging in to GNOME subpixel font rendering a bit with me?  I'm a little shocked at just how much of a mess it still is these days.  It's probably especially the case on Wayland.  My particular case: I have a 4k monitor with BGR pixel layout.  GNOME itself doesn't seem to respect fontconfig for the most part (/etc/fonts/conf.d/).  Most of the ways I've found listed to edit pixel layout in GNOME no longer work: with settings/strings/keys that don't exist (gsettings get org.gnome.settings-daemon.plugins.xsettings rgba-order *No such key “rgba-order”*).  For my workaround for now I'm just setting grayscale in GNOME Tweaks.

What I have found that works so far:

Editing both of these files:
.config/gtk-4.0/settings.ini
.config/gtk-3.0/settings.ini

[Settings]
gtk-xft-rgba=bgr

These settings seem to have BGR subpixel rendering working in most places.  But GNOME Shell still looks like it's using RGB for the top bar, and Firefox seems to be using it for the address bar and bookmarks bar.  I believe rendering of webpages uses the correct BGR.  I think the issue may be with Mutter.  I think I see places in the mutter source that it's trying to get the pixel layout from EDID, but I'm not sure.  I guess I could try looking in to editing my EDID to report BGR next, or building a patched mutter.

wayland-info |grep sub:

subpixel_orientation: unknown

Offline

#2 2025-10-20 18:29:51

tekstryder
Member
Registered: 2013-02-14
Posts: 504

Re: GNOME BGR Pixel Layout

I've never needed to mess with this and no longer use gnome, but...

org.gnome.desktop.interface font-rgba-order wrote:

The order of subpixel elements on an LCD screen; only used when antialiasing is set to “rgba”. Possible values are: “rgb” for red on left (most common), “bgr” for blue on left, “vrgb” for red on top, “vbgr” for red on bottom.

gsettings get org.gnome.desktop.interface font-rgba-order
gsettings set org.gnome.desktop.interface font-rgba-order bgr

...?

Offline

Board footer

Powered by FluxBB