freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: [Devel]Oversampling and rounding TrueType glyphs


From: Keith Packard
Subject: [Devel] Re: [Devel]Oversampling and rounding TrueType glyphs
Date: Wed, 15 Nov 2000 11:00:07 -0800

> 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.

I tried several filters, a gaussian, a simple box filter and intra-pixel
linear and exponential filters.  Any time I included subpixels outside the 
original pixel, I was treated to softened edges for each glyph.  As the
eye recognises glpyhs largely by the sharp edges, reducing the sharpness
is unacceptable, especially in long reading sessions.

One of the "features" of TrueType is that readability is put ahead of 
accurately representing the glyphs on the screen; this means that glyphs
are radically reshaped to keep horizontal and vertical elements aligned 
with pixel boundaries to provide as sharp an edge as possible.  I'm trying
to keep those advantages while improving the appearance of non-rectilinear
elements.

Something that mystifies me is that even though my LCD screen is a regular
grid of RGB subpixel elements, placing the glyph edge anywhere other than
between a blue and red subpixel yields a very noticable color on that edge.

> 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.

Image processing cannot, which makes the problem there significantly 
easier.  Generating text images is different; there *all* of the edges
are supposed to be sharp; we're trying to take advantage of three times as
many edges available in the horizontal dimension of an LCD screen.

> What/where is the ClearType paper you mention?

http://research.microsoft.com/~jplatt/cleartype/

> 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.

The box filter used in the paper above used a 600% oversampling; I'm a bit 
vague as to why, but I was trying to replicate their results.

> 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.

I've created a times roman and italic sample at

        http://xfree86.org/~keithp/render/clear.html

Italic fonts really show what subpixel rendering can do; the near vertical
edges aren't helped much by the TrueType hinting.

> 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

The problem is that the simple technique doesn't generate the best 
results; there's far more human visual system information needed to solve
the problem.  For simple image display, the solutions are easy enough, but
representing text as clearly as possible is a very different endeavor.

address@hidden   XFree86 Core Team              SuSE, Inc.






reply via email to

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