The first place to look when seeking to cure font problems is the
XF86Config
file. (/usr/X11/lib/X11/XF86Config
or
/etc/X11/XF86Config
are the usual locations.) If you haven't
guessed already, the most important part of this file relating to fonts
is the FontPath.
Before we get into that, this would be a good
time to check the other parts of your X configuration. Bad monitor
settings can be even more of a headache than bad fonts, so make sure
your refresh rate is as high as your monitor can handle (85 Hz is great,
75 Hz is OK, 60 Hz is painful.)
Use your favorite text editor and edit XF86Config
. Near the
top of the file, you should see something like this:
FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
The FontPath
tells X where to find the fonts it uses to render
text on your display. Order is important -- when an X application asks
X to render some text, the X server usually has some leeway to choose
the font that is used. The X server then goes through the
FontPath
and grabs the first font it sees that matches the X
client's criteria, and then renders.
The default FontPath typically puts 75dpi fonts before the 100dpi fonts. If you have a high resolution display, this means very tiny fonts. The first tweak you'll use is to switch the 75dpi & 100dpi FontPath lines.
FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
Next, specify that you prefer to use unscaled bitmap fonts. If you've
ever used Netscape or any other program that displays titles using big
fonts, you'll notice that those fonts are pixelized. This is very ugly
and needs to be fixed. So add :unscaled
to the ends of the
misc, 100dpi & 75dpi fonts. You can even use both unscaled and scaled
fonts if you want, just put the unscaled FontPath
lines first
to tell X you prefer unscaled fonts if possible.
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled" FontPath "/usr/X11R6/lib/X11/fonts/Type1" FontPath "/usr/X11R6/lib/X11/fonts/Speedo" FontPath "/usr/X11R6/lib/X11/fonts/misc" FontPath "/usr/X11R6/lib/X11/fonts/100dpi" FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
After making these changes, restart X. Doesn't the desktop look better already?