|
From: | Artur Zaprzala |
Subject: | Re: [Devel] Gamma correction for anti-aliasing |
Date: | Mon, 10 Jun 2002 10:34:16 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 |
Keith Packard wrote:
Around 9 o'clock on Jun 8, Vincent Caron wrote:- What about an interface to set this gamma value in FreeType ? I'm actually not sure if it's FreeType job's : it advertises that it provides exact pixel coverage value, and that's it. But I guess it should capitalize some subtile knowledge like this gamma trick. Anyway, I don't know where to plug that setting. Waiting for David's thoughts.It can't be freetype's job -- it completely depends on the colors used to draw the text. Drawing light text on a dark background requires opposite correction from drawing dark text on a light background.
Yes! Gamma correction is a MUST for antialiasing, but should not be acompile-time option, because what freetype currently does is good only for white text on black background and will worsen quality in applications that do alpha-compositing of text and background in other colours. What's more, alpha-compositing should be done in linear colour space (before gamma correction is applied).
Greymaps rendered by Freetype should be handled by applications as alpha (opacity) layer. Freetype documentation should mention gamma issues. A good starting point is "Gamma Tutorial" from PNG specification at http://www.w3.org/TR/PNG-GammaAppendix.html or Charles Poynton's excellent "Gamma FAQ" at http://www.inforamp.net/%7Epoynton/Poynton-colour.html. Artur Zaprzala
[Prev in Thread] | Current Thread | [Next in Thread] |