freetype
[Top][All Lists]
Advanced

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

Re: [ft] Tweaking/Improving FreeType Antialiasing


From: Tor Andersson
Subject: Re: [ft] Tweaking/Improving FreeType Antialiasing
Date: Sun, 27 Aug 2006 14:24:14 +0200

On 8/27/06, address@hidden <address@hidden> wrote:

[snip]

There are flaws, in my view, with the OS X rendering, but it is (to
me) an absolute night and day improvement over the stuff in FC5.
Similarly, Adobe's CoolType (when properly configured) can look
pretty much as good as OS X as well.

Is it even possible to get FreeType rendering text that even comes
close to the OS X screenshots? If it's not possible with FreeType, is
there some library I could drop in place of FreeType to get text that
(to me) actually looks really good?

To get OS X like text, you have to disable hinting. (This is a truth with
some modification. Since OSX 10.3 there is some very subtle hinting
going on in OSX to align horizontal stems with the pixel grid. In versions
prior to 10.3 all text was rendered completely unhinted.)

It still won't be perfect, since all Linux toolkits snap metrics to
pixel integer coordinates which gives somewhat uneven spacing.
Don't even think about CoolType or ClearType in Linux; the Xft code
does not do filtering across pixel borders so it's a *lot* worse than
it could be.

Add this snippet to your fonts.conf:

<match target="font">
<edit name="hinting" mode="assign"><const>false</const></edit>
</match>

It's not FreeType's fault that Linux text looks bad.
For reference, with FreeType 2 it is possible to get the kind of
text quality displayed in the screenshots on this web page:

http://ccxvii.net/gargoyle/screenshots.html

Here I use FreeType2 to render text unhinted, taking in account
the fractional position of each glyph within the pixel (ie, the render
of a character is different depending on whether it starts at pixel
coordinate 0.0 or 0.2 or 0.7, for example). I also apply a 5-component
wide LCD coloring filter.

Tor




reply via email to

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