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:58:13 +0000

> [ ... ] turned out to be a good one for small fonts, that is
> to hint only vertically, but use subpixel blending to make
> things look optimal horizontally. The reason I found this a
> good compromise was that it preserves both sufficient
> sharpness at low point sizes while not unduly distorting the
> glyphs such that the font becomes too far away from how the
> designer intended it to look.

I have been looking into fonts (as a user...) for a long time,
and this sounds sensible. But I was very struck by one of the
AGG points related to this about the difference between the
different approaches by Apple and Microsoft typography and
between monochrome-optimised and shape-optimised fonts:

  * A coarse grid cannot accomodate at the same type good shapes
    (sharpness) and good geometry (positioning).

  * If your font is meant for printing (higher SNR) media, you
    should trade shape fidelity for geometry fidelity, and use
    subpixel positioning/rendering for that, to keep WYSIWYG.

  * If your font is meant for monitors (low SNR) media, and is
    optimised for them, then enjoy good shapes and snap them to
    grid to preserve them rather than metrics.

Under GNU/Linux/X11 and current toolkits the choice of subpixel
positioning is essentially impossible, so we might as well go
for better (sharper) shapes, and that is my quest.

> [ ... ] small light text on a dark background looked much
> stronger under the Apple rendering than it did with
> FreeType. [ ... ]  same dark text on a light background,
> however, looked pretty much identical, [ ... ]

I am not sure that OSX rendering is the "gold standard", but it
surely was given quite a bit of thought.

> What did solve it was a simple algorithm that used the
> contrast between the text colour and the background colour to
> distort the alpha values produced by FreeType. [ ... ] Maybe
> that helps, probably it doesn't, but I thought I'd share it
> anyway in case it does.

Ah that's interesting and useful. I think that as in my previous
message it is a question whether this should be done withing
Freetype2 or the application using Freetype2. Sounds a bit like
postprocessing like LCD subpixel filtering.

For my practical purposes where I am assuming mostly-unchanged
GNU/Linux/X11 distribution binaries I am just continuing to
experiment with various X11/monitor settings and Freetype2 (via
FontConfig) settings.

As to this I haven't yet reached a conclusion, because my
previously reported 'ftview' tests have perplexed me as to the
extreme differences I see in some and their erraticness (which
may be due simply to bugs in 'ftview').

It looks like that LCD subpixel rendering is less bad today
(with filtering) than I thought, and that seems to reduce the
thickness of "fuzz" of the shapes and thus the dependency on
foreground and backround gamma/contrast ratios.

Also I keep having the impression that the hinter for the
PostScript fonts is rather good (as in "shaper") and possibly
better for anti-aliasing than the bytecode hints in TrueType (as
AGG points out, they are designed for aliasing), or the
autohinter for TrueType.

As to this, one of my usual peeves: curse on Adobe for
motivating Apple and Microsoft to develop TrueType as an
alternative.



reply via email to

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