Re: New GTK+ anti-aliasing patch posted

Around 9 o'clock on Mar 13, Michael L Torrie wrote:

> What I meant about turning it off and on from an API is that KDE 2.1 has a
> global option to turn on anti-aliasing or not.  I would like to use the
> anti-alias patches, but since I support workstations with many users, I
> don't want to force all of them to have to use it.  I know that some
> people dislike anti-aliasing.  This could be written into the toolkit API
> somewhere.

Yes, Gtk should have some configuration options.  However, in the interim, 
you can control the overall behaviour with X resources and ~/.xftconfig 
files.  ~/.xftconfig is per-user while Xft.antialias: false is per-display.

> At the smaller sizes, whatever algorithm MS Windows uses, it seems to
> display better than the Xft method.  Xft seems to just render at a higher
> resolution (size) and then use pixel averaging to reduce it to screen
> size.

This is the difference between Type1 fonts and TrueType fonts -- the 
Freetype Type1 rasterizer doesn't interpret the Type1 hints very well and 
the result is blurry text at all sizes.  The Freetype TrueType rasterizer 
does a fine job.  Check out:

Using 'xmag', you'll see that all of the horizontal and vertical elements 
are snapped to the nearest pixel.  This avoids the blurry edges seen when 
using simplistic oversampling to rasterize the glyphs.

At *really* small sizes, the Freetype rasterizer seems to "give up" and
stop snapping.  I suspect this happens when the stroke width is much less
than one pixel, but I haven't examined the code to see what it does.

keithp keithp com	 XFree86 Core Team		SuSE, Inc.

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