[cairo-bugs] [Bug 28549] New: Gamma-corrected alpha blending for text output

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 15 05:21:12 PDT 2010


           Summary: Gamma-corrected alpha blending for text output
           Product: cairo
           Version: 1.9.9
          Platform: All
        OS/Version: Linux (All)
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: freetype font backend
        AssignedTo: david at freetype.org
        ReportedBy: alankila at bel.fi
         QAContact: cairo-bugs at cairographics.org

I'm soliciting interest for improving text rendering on the Linux desktop by
applying gamma correction for the text. I have written a couple of JavaScript
demos (for use in chromium or firefox) that can demonstrate the problem and
what I think should be done about it.

To view these demos, a TFT display with RGB subpixel order is required.
Chromium is preferred because of faster JavaScript execution. I have not tested
the demo on other browsers.

Firstly, a screenshot highlighting the difference between Linux and Windows 7
font rendering. The gnome font settings are set to 'no hinting', and LCD with
RGB subpixel order. I've also installed the msttcorefonts to have the Arial
font used on the demo:


The Linux browser's rendering on the bottom left shows a dirty halo around the
text on black-on-white, clear color fringing on white-on-black, and significant
darkening of the green-on-violet test cases. In summary, the javascript results
are similar on both linux and windows, and the windows 7 output resembles the
javascript output much more than linux output. Subjectively, the linux results
are far worse than the others.

The actual demo can be played with here:


The demo renders the text anew on changes to text field input value. For
instance, replacing the gamma 2.0 value with neutral gamma 1.0 produces
javascript results that are distinctly similar to those given by linux
browsers. Therefore it seems likely that lacking gamma correction on text
output is the reason for the poor results on Linux.

As additional evidence, executing "xgamma -gamma 2.0" makes the Linux browser
results seem fairly similar as the javascript results are with normal gamma
value, indicating that Linux font rendering can be remedied by use of linear
gamma display.

More information about the cairo-bugs mailing list