Keith Packard said:
So, we really need two fixes -- one fix to adjust the partial coverage values
to
accomodate the output device pixel characteristics, and a gamma correction to
adjust for output device luminosity behaviour.
Keith said it all, the GRAYS_USE_GAMMA is a bad hack that works by chance in a
peculiar environment, it should go away. The 'gamma code' in the ftstring demo
implements such a hack, but it's wired to the [monochrome] rendering code here
(thus
it failed horribly when the colors were inverted).
I have implemented a gamma-corrected alpha blending to play with (in GTK+ widh
GdkRGB,
I think I lost the code) : http://zerodeux.net/misc/ft/aa/
Basically, you do the linear interpolation in the 'gamma corrected space', so
it goes
like :
dest = GammaInverse( coverage * Gamma(src) + (1 - coverage) * Gamma(dest) )