[Fontconfig] Greatly improved subpixel filtering in Xft

Keith Packard keithp at keithp.com
Thu May 6 12:21:53 EST 2004

Around 20 o'clock on May 5, Anders Kaseorg wrote:

> We might disagree about what correct hinting is--I happen to think that 
> Freetype's medium autohinting (shown in my screenshots) gives the best 
> fonts I've ever seen on a computer screen. I'm sure it's a matter of 

I mean TrueType fonts with the bytecode interpreter enabled.  In that 
environment, vertical and horizontal elements align to the pixel grid, 
which is not the case even with the FreeType autohinter set on 'full'.

In any case, it does appear that the filter to be used may indeed need to 
be specified with some kind of preference; in your auto-hinted example, I 
preferred the sharper appearance of the intra-pixel hinting to the softer 
(but less colored) appearance of the inter-pixel hinting.

I used an intra-pixel hinter to ensure the pixel metrics returned by the 
library matched the actual coverage of the glyphs; inter-pixel hinting 
will stretch the glyphs by one or more pixels in the filtered dimension, 
which seemed less desirable to me.  We could just fix up the metrics 
though; that seems relatively easy.

> However, with subpixel rendering (and good filtering :-)) there isn't 
> much of an advantage to snapping things to whole-pixel boundaries (at 
> least horizontally), as full hinting currently does. It would make more 
> sense to hint to pixel boundaries vertically and subpixel boundaries 
> horizontally. Is it possible to make Freetype do that?

Yes, it's quite possible to do that; you hack Xft to apply the times-3 
transformation before the hinting rather than afterwards.  I recall trying 
that and being quite disappointed with the results because neighboring 
edges tended to really magnify the color fringing effects.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040505/5b70da08/attachment.pgp

More information about the Fontconfig mailing list