[cairo] Subpixel Positioning w/FreeType

Jonathan Morton jonathan.morton at movial.com
Thu Oct 8 07:14:48 PDT 2009


On Thu, 2009-10-08 at 09:24 +0100, Freddie Witherden wrote:
> On Thursday 08 October 2009 01:13:28 Bill Spitzak wrote:
> > The 4 bits may only be some internal data storage and ClearType may be
> > using fewer images, ie some of the 16 possible sub-positions map to the
> > same glyph. 4 is the smallest power of 2 that will give 3 positions
> > anything close to equal weight and may explain why it was chosen.
> 
> It is my understanding that three positions of subpixel precision were chosen 
> as most LCD screens are made up of three vertical subpixels. While it does 
> seem theoretically possible to have more than that by adjusting the intensity 
> of the pixels this is likely to cause blur glyphs further.

As long ago as 1994, Acorn's RiscOS supported subpixel positioning of
antialiased text.  This was in the absence of any LCD-specific reasons
for doing so, as ClearType had not yet been invented.  I believe it only
supported half-pixels, or maybe quarter-pixels on each axis, but that
was more due to memory constraints than anything else.

It *did* improve the appearance of text, whenever the layout was not
explicitly bound to the screen physics - and this was on a mid-1990s 15"
CRT, on a machine rarely seen outside the UK.  The colour palettes were
heavily weighted towards grey-levels to support it.

With a 30MHz ARM CPU, it obviously had to pre-render and cache the
glyphs to get interactive performance.  It would have been unthinkable
on a similar 486 - at the time, an ARM was considered very fast.

By 1995, Apple also supported subpixel positioning of non-antialiased
text.  There was a preference option for it in ClarisWorks 3.  I always
turned it on and saw the difference.  I don't know how many bits were
involved, but I don't remember it causing any performance trouble on a
68K-based PowerBook.

ISTR seeing an article on ClearType which demonstrated that more than
even 4 bits of subpixel positioning could be visible even on horizontal
text.  The demonstration involved sub-point increments in font size.

The "blurry" argument is fallacious.  Windows users are just too used to
aggressive hinting, which distorts the glyph shapes in the name of
optical sharpness.  RiscOS didn't use hinting, and it looked wonderful
even at very small sizes.

-- 
------
From: Jonathan Morton
      jonathan.morton at movial.com




More information about the cairo mailing list