Linear blending for glyphs

Markus Trippelsdorf markus at trippelsdorf.de
Sat Nov 2 09:27:18 CET 2013


There is an interesting discussion on the FreeType mailing-list about
the necessity to use linear blending for glyphs:
http://thread.gmane.org/gmane.comp.fonts.freetype.devel/9105
http://thread.gmane.org/gmane.comp.fonts.freetype.devel/9117

Currently Linux performs the blending in non-linear space (without gamma
correction). The issue could be fixed by using the following steps (to quote
Dave Arnold):

1. get the background pixel and convert to a linear space
2. get the foreground pixel (text color) and convert to a linear space
3. combine the two colors in linear proportion to the text density 
   (alpha value) for the pixel
4. convert the result back to the system color space

Steps 1,2 and 4 can be done with lookup tables,

I'm not familiar with the Xorg source, so my question is where in the Xorg code
path should this conversion take place?

Thanks.
-- 
Markus


More information about the xorg-devel mailing list