Font antialiasing on X (was: Re: Font Contrast)

2006-02-13 Thread Gus Koppel
MEA-Mike.Friedrichs wrote:

 This may be the wrong place, but since I have a question about Gnome, 
 which is built with GTK+, I may be in the right place.
 
 I have installed Novell's Suse 10.0 and having problems getting the 
 font to show their true colors and sharpness on the edges.
 
 When I pick the font color to be black on a white back ground, the 
 black always shows some gray tones, and ragged on the edges.  I've 
 tried as black as I am allowed but always ends up with gray tones.
 
 There must be some setting that allows me to get good clean black characters.
 
 By, the way I'm using *.ttf fonts.  I've also imported the fonts from 
 my XP machine, this was an recommendation, but not the solution.

This question is related to rather generic X-Windows behaviour and
neither to Gnome nor GTK+ nor application programming, indeed. For
instance, the same applies to QT-based applications (KDE). Anyway:

The font rendering effect you're referring to is called antialiasing.
It's meant to make fonts appear smoother on screen, especially at small
sizes or low screen resolutions, by using intermediate colours at the
edges. The same effect basically takes place on MS-Windows font
rendering and in nearly all modern 3D games, btw.

While this effect is considered an improvement of display quality by the
majority of users, some users may not like it or there may be some
situations (certain fonts at certain sizes) when antialiasing seems not
appropriate and may rather worsen the appearance.

Hence, the effect can be turned off. In X-Windows it's nowadays
controlled by the Xft + Fontconfig library. Unfortunately AFAIK there is
no way to thoroughly configure use of antialiasing via Gnome, so you
will likely have to edit the config file manually. The advantage of
doing so is, that you can not only turn on or off antialiasing entirely,
but also enable or disable it for particular fonts at particular sizes
and such stuff.

The file to edit should be /etc/fonts/font.conf. It's an XML file, so
you may need some basic knowledge about XML to understand it.
Unfortunately it has a rather complex (I'd say: bloated) structure, so
it may not be easy to understand. Anyway, you can turn off antialiasing
entirely by inserting a statement like this:

 match target=font
   edit name=antialias mode=assignboolfalse/bool/edit
 /match

For further information see also:

http://en.wikipedia.org/wiki/Font_rasterization
http://en.wikipedia.org/wiki/Antialias
http://www.fontconfig.org/fontconfig-user.html
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-fonts.html
http://keithp.com/~keithp/talks/xtc2001/paper/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Font antialiasing on X (was: Re: Font Contrast)

2006-02-13 Thread John Cupitt
On 2/13/06, Gus Koppel [EMAIL PROTECTED] wrote:
 Hence, the effect can be turned off. In X-Windows it's nowadays
 controlled by the Xft + Fontconfig library. Unfortunately AFAIK there is
 no way to thoroughly configure use of antialiasing via Gnome, so you
 will likely have to edit the config file manually.

GNOME does have some GUI for font rendering configuration: it might be
worth trying that (if you haven't) before attacking the XML config
files.

Click System / Preferences / Font, then try selecting Best contrast.
If you click Details ... you can change some more settings, such as
RGB order and hinting.

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list