BGR-ordered subpixel font rendering appears broken/nonfunctional in Gnome/GTK+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTK+ |
Fix Released
|
Medium
|
|||
Mozilla Firefox |
Fix Released
|
Medium
|
|||
cairo |
Fix Released
|
High
|
|||
Ubuntu |
Fix Released
|
Low
|
Unassigned |
Bug Description
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-
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-
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
ProcVersionSign
Uname: Linux 2.6.35-24-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Fri Jan 14 22:14:58 2011
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gtk+2.0
Changed in gtk+2.0 (Ubuntu): | |
status: | New → Confirmed |
Changed in gtk: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in cairo: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
Changed in gtk: | |
status: | New → Fix Released |
Changed in firefox: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in cairo: | |
status: | Confirmed → Fix Released |
Changed in firefox: | |
status: | New → Fix Released |
I'm a little dismayed at the lack of action here, because Natty Alpha 2 just came out, and I verified it has exactly the same problem (following booting from the AMD64 LiveCD).
I have objectively verified my findings. There is NO DIFFERENCE between RGB-ordered font rendering and BGR-ordered font rendering in Gnome/GTK+ applications, where there absolutely should be.
I opened up a galculator window (selected because it is a static window with a variety of fine text and no blinking cursor or other distractions). With the program open and otherwise unused, I selected each of the four possible subpixel antialiasing options (RGB, BGR, VRGB, VBGR) via the Gnome appearance settings panel, in turn, and each time I captured a screenshot of just the galculator window.
I then calculated md5sums on each of the resulting PNG files.
7e9d1be5a35fb8c 9e02f5744db81d7 65 Screenshot- galculator- bgr.png 9e02f5744db81d7 65 Screenshot- galculator- rgb.png 4aa6faca84eb6ee 15 Screenshot- galculator- vbgr.png 43ad9e12547138a a0 Screenshot- galculator- vrgb.png
7e9d1be5a35fb8c
778b69aa3eb0dee
f6d55d5d5fcdd6d
As you will see, the -bgr and -rgb screenshots calculate to exactly the same md5sum. THERE IS NOT A SINGLE PIXEL DIFFERENCE.
In contrast, -rgb, -vrgb, and -vbgr are all different, as expected.
Would someone mind confirming this bug? I'd like to get it fixed. Font rendering is one of the reasons I moved away from Windows more than five years ago.
I'm attaching 4x enlargements of a crop of each of the galculator window screenshots. If you look at the color fringing around the word "log," you should be able to see what I'm talking about. Between -vbgr and -vrgb, the red and blue fringes around the "o" and "g" switch between top and bottom, as expected. But with both -rgb and -bgr, the red fringes stay on the left and the blue fringes stay on the right in both cases, when they should be switching.
I don't know how much more I can say about this, so I'll leave it there and hope for some further input from a developer or maintainer.