After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657525 - BGR-ordered subpixel font rendering appears broken/nonfunctional in Gnome/GTK+
BGR-ordered subpixel font rendering appears broken/nonfunctional in Gnome/GTK+
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: xsettings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-27 19:19 UTC by Simon Elmir
Modified: 2011-08-30 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Illustration of the problem (211.77 KB, image/png)
2011-08-27 19:19 UTC, Simon Elmir
Details

Description Simon Elmir 2011-08-27 19:19:38 UTC
Created attachment 194939 [details]
Illustration of the problem

(copied from Ubuntu Launchpad Bug #703191)
I'm filing this bug against gtk+, but frankly I don't know exactly what package is the culprit. It's occurring somewhere between the Gnome "Appearance" preference panel and freetype, I suppose.

In summary, subpixel-antialiased font rendering to a Blue-Green-Red (BGR) ordered display panel is broken in Maverick (10.10, Gnome). There is NO DIFFERENCE between text rendered using the "RGB" setting and the "BGR" setting. It is blurry and fringy on my BGR panel in both cases, contrary to my experiences over the last few years with previous releases, under which I always had sharp results.

I'm running Ubuntu 10.10, 64-bit, on a generic PC with an Nvidia 7900GS card, using the latest proprietary Nvidia driver. The monitor is a Dell 1800FP, one of the few BGR panels out there, unfortunately, and it is connected via DVI.

There is no change whatsoever when toggling between the two horizontal subpixel options in the "Appearance" settings panel (System->Preferences->Appearance->Fonts->Details). No matter how closely I look, not a single pixel changes. I can see small changes (as expected) when I go back and forth between "RGB" and "VRGB," for example, but "RGB"<->"BGR" appears to do absolutely nothing.

I can verify that what I'm seeing (with either "RGB" or "BGR" selected) is, in fact, RGB-ordered subpixel rendering. If I take a screenshot and mirror it horizontally, which essentially turns RGB into BGR, what I see is very nice, clear text on my screen. Unmirrored, it's ugly and fringy.

I have tried various versions of the Nvidia driver, and it doesn't help. Nor does using an unaccelerated driver. Nor does the status of compiz desktop effects, on vs. off.

I have had excellent font rendering in the past, up through and including Lucid (10.04).

In Firefox, for some reason, the systemwide RGB/BGR setting *does* work. If I select "BGR" in the Gnome appearance preferences and refresh a web page, it looks GREAT! Re-select "RGB," refresh, and it's ugly again. All other text on the screen in Gnome/GTK applications remains unchanged.

And Qt-based applications also work correctly, according to the settings I have in ~/.fonts.conf. Those applications have great-looking text.

So there's something weird going on. This preference isn't being respected by my desktop or the Gnome/GTK applications I use, and it has worked perfectly in the past. My Google searches for others experiencing this problem have come up empty.

In attempting to troubleshoot this problem, I tried numerous different LiveCD images to see whether they worked. (I booted them in a kvm virtual machine, and carefully inspected their on-screen output.) Here's the summary:

Ubuntu 10.10: BROKEN - no BGR font rendering (both 32-bit and 64-bit versions tested)

Xubuntu 10.10: BROKEN - no BGR font rendering

Ubuntu 11.04 alpha: BROKEN - no BGR font rendering

Ubuntu 10.04.1: WORKS FINE!

Kubuntu 10.10: WORKS FINE!

Obviously, in each case, I had to change the default rendering options through settings.

So apparently BGR font rendering is OK in KDE/Qt, and broken in GTK-based releases, both Gnome and XFCE. And the bug seems to be carrying over into Natty, at least early in its cycle.

I look forward to seeing this regression corrected.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libgtk2.0-0 2.22.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Jan 14 22:14:58 2011
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gtk+2.0
Comment 1 Matthias Clasen 2011-08-28 15:55:45 UTC
The xsettings plugin in gnome-settings-daemon pays no attention to the rgba-order key when translating font-rendering-related gsettings to xsettings/xft.

Code for doing that used to exist in gnome-control-center ca. 2002.

From discussion with Owen:

<owen> mclasen: seems to be code for it in gnome-control-center commit 05fb268094d119c236f4a01689fc5aa722cf4bac
<owen> (from 2002)
<owen> mclasen: I certainly probably provided advise at some point that it should definitely not be exposed in the UI
<owen> mclasen: since it's *ALWAYS* rgb except on rotatable devices, where it has no fixed value and should be auto-determined at runtime
<mclasen> ok, fair enough
<owen> but if it's in hte schema, it seems like it should be hooked up
Comment 2 Bastien Nocera 2011-08-30 14:23:17 UTC
commit 7967b6eb4ec78f5553a02eb97236ef3b91d80998
Author: Bastien Nocera <hadess@hadess.net>
Date:   Tue Aug 30 15:21:49 2011 +0100

    xsettings: Handle rgba-order key
    
    Seeing as we have a key to set that up, let's hook it up.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657525