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: Werner LEMBERG
Subject: Re: [ft] changing the depth of gray for anti-aliasing
Date: Mon, 13 Feb 2012 08:46:29 +0100 (CET)

> However admittedly the light/medium/dark gamma tests in the KDE
> settings do look best on gamma 1.6-1.7, as in I can distinguish
> rather more dark grays than at gamma 2.2.
> 
> Which is unfortunate, because it looks like Freetype2 is set for
> the "right" gamma which nobody uses...

This is not correct.  What FreeType returns is simply the pixel
coverage of the outline.  It's really up to the OS to adjust this for
best viewing.

> '/etc/fonts/' file. First two things that seem bugs:
> 
>   * "'h' or "glyph hinting" seems to force antialiasing on
>     when "sbits cache" is active, but not with "normal cache".
>     I have thus done all tests with "normal cache".

I can't repeat this.  Please give an exact recipe how to reproduce the
effect you are observing.

>   * Sometimes the "glyph waterfall" (which I have used for all
>     testing) shows some sizes as essentially identical (e.g. for
>     Deja Vu Sans Mono 13pt and 14pt, 15pt and 16pt, and 20pt and
>     21pt are only slightly different, but same widths). This
>     happens only when (not necessarily an exhaustive list):
>       - "anti-aliasing" off, "forced auto-hinting" off.

First of all, DejaVu is not designed for B/W rendering; anti-aliasing
should always be activated.  Secondly, what you see is intended by the
font authors who have written the bytecode hinting.

>       - "anti-aliasing" on, some combinations of "forced
>         auto-hinting" and "light anti-aliased" have seemingly
>         identical different point sizes.

Glyph heights get rounded to integers.  Depending on the size, two
PPEM values can cause the same rounded glyph height.

>   * "light anti-aliased" seems to give seemingly much thicker
>     features than "normal anti-aliased", yet the glyphs seem
>     narrower, and more evenly spaced (the metrics seem identical
>     though, some glyphs just seems to shift position a bit).
>     This seems to happen only if "glyph hinting" is active.

Light anti-aliasing uses the autohinter instead of native bytecode.

>   * I was amazed by how enormously different glyphs can be
>     between "forced autohinting" on and off. I have tried DejaVu Sans
>     mono for Truetype (which contains also some bytecode hints)
>     and Adobe Courier for PostScript:
>     - with "forced autohinting" on, glyphs are much taller than
>       with it being off.
>     - With "forced autohinting" on, glyphs in antialiased mode
>       look rather thicker.

The autohinter always follows the same algorithm, while manual hinting
can adjust better.  However, we are working on improving the
autohinter.

> I have also slightly modified 'ftview.c' from 'ft2demos-2.4.8' to
> cycle backwards and forwards through rendering modes and LCD modes,
> [...]

Thanks a lot!  I've added this to the git repository.


    Werner



reply via email to

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