freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel]Oversampling and rounding TrueType glyphs


From: Henrik Gedenryd
Subject: Re: [Devel]Oversampling and rounding TrueType glyphs
Date: Wed, 15 Nov 2000 09:23:51 +0100
User-agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630)

Keith Packard wrote:

> A straightforward RGB decimation yields noticable chromatic aberrations,
> the ClearType paper suggests a simple filter (they use a box) to reduce
> these effects; but filtering in this manner generates vertical edges which
> are no longer sharp.  The filter picks up samples across the sharp edge
> and smooths both the chromatic change along with the intensity change.
> Hmm.  That might be the key.

Keith,

I implemented sub-pixel rendering almost a year ago, for Sqeuak
(www.squeak.org). I used a bell-type filter, which I think works well and I
would recommend you to try it as well. The problem is that any image
processing can never really "know" when a full pixel is supposed to be a
sharp edge, and when not. Note that a perceived color artifact depends not
only on one pixel but its neighbors as well. What/where is the ClearType
paper you mention? I based my work entirely on what is at

http://www.grc.com/ctwhat.htm

The balancing filter is also described there. You take the value of each
sub-pixel (which is one pixel before you compress your 300% wide font
bitmap) and spread it over its four neighbors like this:

-------  -------  -------  -------  -------
| 1/9 |  | 2/9 |  | 3/9 |  | 2/9 |  | 1/9 |
-------  -------  -------  -------  -------

It's really well described at the site above.  It doesn't give perfectly
sharp edges but sufficiently good ones I think. I'll send you a couple of my
samples off the list.

By the way--why do you go to 600% ? 3 times wider would seem to be enough to
get a pixel each for every R G B subpixel.

You might also want to use a font that is trickier to render than the
terminal font you are using--it's already so well hinted that there's almost
nothing left for your sub-pixel rendering to do! Try a serif one--although
Times doesn't really allow any good results.

It's a pity that such a simple technique isn't used by more software. My
final Smalltalk algorithm was about 25 lines in all. You can see more about
what I did at

http://minnow.cc.gatech.edu/squeak/1225

also try 1241 instead of 1225 if you don't find your way to that page by
clicking on the right links. Some problems with the FT2 beta at that time
show up in the images--they are not problems with my code ;-)

Henrik





reply via email to

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