[ltp] font rendering

Antiphon linux-thinkpad@linux-thinkpad.org
Sun, 4 Jul 2004 01:34:22 -0500


On July 3, 2004 01:46 am, Hartwig, Thomas wrote:
> Hi Antiphon,
>
> you can see what I mean in the lower right corner of Konqueror of the
> first screenshot. The text "Chretien, Martin..." is not antialiased and
> becomes crispy in the edges. This is even more worse with smaller font
> sizes.
>
> But thank you anyhow, I will try to look at the latest code.
>
> Thomas
>
> Antiphon wrote:
> >>Hartwig, Thomas wrote:
> >>>thank you, this helps me turning off antialiasing in the right way. I
> >>>have set GDK_USE_XFT=0 before starting mozilla to turn it off.
> >>>
> >>>But my main problem is when I have turned it off, the TTF-fonts look
> >>>very ugly.
> >
> > My advice would be to just download the latest version of freetype2 and
> > compile it from source. Most distros automatically enable the hinting but
> > the ft hinting isn't as good as other OSes'. You'd have better luck just
> > trying the stock Freetype which has hinting disabled. Freetype used to be
> > poor at rendering antialiased fonts but it has been significantly
> > improved thanks to some excellent rendering code written by David
> > McGill(?) in 2003.
> >
> > As an example, check out some of these screenshots from my desktop. In
> > the second shot, I visited Looky which uses Verdana as its default font.
> >
> >
> > http://www.kde-look.org/content/preview.php?preview=1&id=11670&file1=1167
> >0-1.png&file2=&file3=&name=Emerald+Colour+scheme
> >
> > http://www.kde-look.org/content/preview.php?preview=2&id=7919&file1=7919-
> >1.png&file2=7919-2.png&file3=7919-3.png&name=KDE+3.2++alpha1


The aliased font you see in the first screenshot is the product of a lazily 
set up fontconfig file. Since I took that screenshot, I went into 
my /var/lib/fontconfig/local.conf (may be different place in your distro) and 
disabled bitmap fonts by putting an XHTML comment tag on the line
  <dir>/usr/X11R6/lib/X11/fonts</dir>

After that, any program which uses fontconfig (including Mozilla) will not use 
any bitmap fonts. 

PS: Another term for antialiasing is smoothing which you may find easier to 
use.