Simon Thum | 18 Mar 2002 11:48
Picon

Gamma, AA and Fonts

Hi List!

I am a computer sciences student and I'm primarily here because I think
the Render extension needs a little fix.

I browsed through several discussions of this topic on this list, but
AFAIK there is generally seen no need to apply gamma correction to
antialiased fonts. I think this is wrong, and I'll provide the following
simple test to prove it:

My X runs with gamma=1, as xgamma reports. My monitor has approximately
2.3, the exactness of that value is quite unimportant. Your setup should
be similar, as most monitors are around that.
Using the console, look at some characters in black-on-white. Now mark
them, so they appear white-on-black. Or do something else to compare
B-on-W against W-on-B.
Suddenly the caracters look thinner, and less equal bright. I've seen a
lot of descriptions for this on this list.

Now run: xgamma -gamma 2.3

The 2.3 is for my monitor, if you know yours use that but it won't make
much of a difference, except maybe if you have a Mac.

The screen will be much brighter, but the characters are much more in
tune. BW and WB characters look equally good, IMHO even more balanced for
most fonts.

What happens? With this gamma correction a basic assumption of the
font renderer (50% pixel coverage becomes 1/2 of BG/FG color added)
(Continue reading)

Billy Biggs | 18 Mar 2002 19:36

Re: Gamma, AA and Fonts

  Hi Simon,

  I posted a patch to this list for gamma correct compositing:

  http://www.xfree86.org/pipermail/render/2001-December/001502.html

  Unfortunately, I haven't had time to try it myself.  I was hoping
someone like you would have more time than myself. :)

> I browsed through several discussions of this topic on this list, but
> AFAIK there is generally seen no need to apply gamma correction to
> antialiased fonts.

  I think it's generally understood that any time you interpolate colour
you must take gamma into account.

> AFAIK there is no way to get a display's gamma from X (which could be
> known through configfile or maybe DDC), which IMHO is a design flaw.
> Microsoft made the sRGB standard which provides a default of
> gamma=2.2; things are a little more complicated anyway, but a loose
> match is ok for antialiasing issues.

  The standard gamma of 2.2 is pretty prevalent.  I was told that the
gamma returned by most monitors isn't correct anyway.  I agree that X
should provide some way of querying a global display gamma value so we
can use it for image processing (and compositing).

  Yes, I do intend to do more research on doing a proper patch etc, but
school has been alot of work this term.  Next month should be better.

(Continue reading)

Keith Packard | 18 Mar 2002 19:47
Favicon
Gravatar

Re: Gamma, AA and Fonts


Around 12 o'clock on Mar 18, Billy Biggs wrote:

>   The standard gamma of 2.2 is pretty prevalent.  I was told that the
> gamma returned by most monitors isn't correct anyway.  I agree that X
> should provide some way of querying a global display gamma value so we
> can use it for image processing (and compositing).

X has a standard for setting and querying the value->luminance curves for 
each primary on the screen, plus a standard for setting and querying the 
conversion from CIEXYZ to RGBi.  Read up on the XDCCC support in the ICCCM.

Keith Packard        XFree86 Core Team        Compaq Cambridge Research Lab

_______________________________________________
Render mailing list
Render <at> XFree86.Org
http://XFree86.Org/mailman/listinfo/render


Gmane