freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] bytecode interpreter makes antialiased text worse?!


From: David Turner
Subject: Re: [Freetype] bytecode interpreter makes antialiased text worse?!
Date: Wed, 09 Oct 2002 10:17:49 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Hello Ben,

Ben Liblit wrote:
Red Hat 8.0 ships a GNOME2 environment that uses FreeType 2.1.2 for most
text rendering.  (Yay!)
>

Acutally, this may not be of importance to you, but others might be
interested that what is used on Red Hat 8.0 is a development version of
FT2 that if more similar to the upcoming 2.1.3 than 2.1.2 :-)

Their standard FreeType build *disables* the bytecode interpreter.
>
Yep, that's standard. A few distributions still enable the bytecode
interpreter by default, like Debian. I've been told that Suse does
it too (anyone could confirm this ??)

I'm pretty certain that they'll soon drop it due to recent improvements
in the auto-hinter :-)

> While text is rendered antialiased by default,
non-antialiased text clearly looks a bit lumpy without the bytecodes to
help smooth things out.

That's also true. I haven't optimized the auto-hinter for monochrome
rendering just yet. There is anyway little doubt that carefully-hinted
TrueType fonts will always generate better mono output with the bytecode
interpreter turned on.

I decided to rebuild my FreeType with the bytecode interpreter enabled. Non-antialiased text looks much better. However, I was surprised to
observe that antialiased text looks significantly *worse*.

That's not very surprising. Most of the hints found in TrueType fonts
are optimized for monochrome rendering only, and this creates some rather
surprising effects when anti-aliasing at small pixel sizes.

Many popular fonts have this problem, this includes Arial,
Times New Roman, Verdana, Georgia, etc... And I doubt you'll see an
AA-optimized version of these fonts freely available.

(It seems that Windows XP includes fonts optimized to better display
 with ClearType, but these are not the ex-free "Web fonts" that once
 were distributed on Microsoft's sites)


Consider the two small images attached below.  The first,
"no-bytecodes.png", shows some text rendered by a GNOME2 panel menu
without the bytecode interpreter.  Contrast this with the second,
"bytecodes.png", taken with the bytecode interpreter enabled.

When the bytecode interpreter is turned on, notice that several rendering anomalies appear:

   - Several letters are narrower, giving the whole run of text a more
     compressed feel.  This is especially noticeable in "R" and "o".

   - The left side of the "Q" is painted in too light a shade of grey,
     causing it to drop out somewhat.  "C", not in this sample, has the
     same problem.

   - "Qu" are set right up against each other, with insufficient
     whitespace between them.

   - "M" is distinctly asymmetric.

   - The enclosed loop of "a" looks muddy, as it is partially filled
     with grey.  Contrast with "a" drawn without the bytecode
     interpreter, which has a nice clear loop.

The font in use here is "QuickType II", copied over from my Windows
partition, where it was installed by I-have-no-idea-which-application.

Can somebody help me understand what I'm seeing here?  Why would the
bytecode interpreter make things worse?  Does this suggest that the
specific font being used just has uniquely bad bytecodes, or would this
effect appear for other fonts as well?

What you see is normal. The TrueType hints are specifically written to
distort the outline in such a way that this produces optimal monochrome
glyphs. However, this distortion is very visible, and unpleasant when
using anti-aliasing with a high number of gray levels...

There is nothing that can be done for now, since we don't intend to modify
the fonts :-)

We could maybe patch the TrueType font driver in FT2 to use the bytecode
interpreter _only_ when monochrome rendering is wanted, but this will
generate glyphs with completely different metrics, and this may break
some applications (which assume that a glyph's metrics are independent
of the target hinting mode...)


Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

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