freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] changing the depth of gray for anti-aliasing


From: Peter Grandi
Subject: Re: [ft] changing the depth of gray for anti-aliasing
Date: Tue, 14 Feb 2012 12:34:23 +0000

> [ ... ] the problem is that the algorithm used to blend the
> anti-aliased text with the background doesn't properly take
> into account the relevant properties of the human visual
> system.

I partially agree and on reflection I think that there are two
different problems, one of magnitude and one of fundamentals:

  * If the pixel grid is of the same frequency as glyph features
    (1 pixel wide features) then the anti-aliasing happens with
    a very unfavourable signal to noise ratio, and this magnifies
    any issues with the "fuzz".

  * One of these issues is that Freetype2 as such only delivers
    a "stencil", and indeed that may need adjusting during
    rendering onto the destination canvas.

It is a good question whether the "stencil" should be
pre-adjusted by Freetype2, e.g. by passing to it some kind of
"canvas gamma/contract ratio" parameter, or it should be
postprocessed by the rendering system.

> It should be possible to develop a suitable blending algorithm
> that has a (more) perceptually uniform effect. I've no idea
> whether anyone's done so though.

Yes, currently Freetype2 provides a gamma/contrast ratio
independent stencil, so it should be the application using it
that should do that.

But I am not sure that it is a perceptual problem: I suspect
that the stencil delivered by Freetype2 is actually designed for
a specific canvas, because I suspect that the anti-aliasing
process itself, not just the blending, should dependent on the
specific background/foregorund colours (especially in the case
of subpixel rendering).

I suspect so because it struck me how changing the monitor gamma
changes the relative weight of monochrome and anti-aliased glyphs;
perhaps it is inaccurate, but I would say that the stencils
produced by Freetype2 seem (inadvertently) designed for gamma
1.6 canvases.

Also, practically speaking I don't seem any quick way to get the
major graphics libraries like Gtk2 or Qt4 to be enhanced, so in
part I am getting used to a monitor gamma of 1.8 on a PC, plus
some tweaking of the anti-aliasing process.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]