Linux for the Clueless: Fonts

By Ed Hurst | Posted at 3:23 AM

Linux is capable of superior font display handling. On my hardware, it's better than any version of Windows if those capabilities are taken advantage of. However, its capabilities are not turned on in Red Hat Enterprise Linux (or many other distributions) by default. There are several issues involved, but never fear — they can be solved.

First, let's get some better fonts. If you have access to a Windows machine, copy off the font files for your favorites. I'm going to warn you only the older ones work properly, such as Arial, Courier New, Comic Sans, Palatino, Tahoma, Trubuchet, Verdana, etc. You can try, say Consolas, on your machine when we are through fixing, but you may not like it. At any rate, copy the actual font files to a thumb drive and plug it into your Linux computer.

For the sake of simplicity we will copy them to your user account font storage: ~/.fonts — that's a folder in your Home directory. If it's not there already, simply create it using the file manager from your Home icon on the desktop. You can use the menus or try the right-click menu. This folder not normally visible unless you go out of your way to find it. That leading period in the folder name tells Linux “hide” it so it won't get in your way, and the system expects to find it so. The system knows to look in that particular folder when offering you font choices.

Next, in your System menu, select “Appearance” and click the “Fonts” tab. You'll see some drop-down list buttons where you can change the default fonts in the GNOME interface. The fonts you just copied should be immediately available. Next, notice the “Rendering” section at the bottom. If you have some sort of LCD screen, select that. Otherwise, experiment until you like what you see. Now hit the button marked “Details…”

Most of the time the resolution is correctly set by the display system. Don't mess with this until you know a lot more about it. Instead, test the various settings below that. Make it look as good as you can, knowing we are only getting started. I use LCD smoothing, full hinting and RGB color balancing. It should get even better in a bit. You'll notice changes in the entire interface take effect immediately. So far so good for stuff controlled directly by GNOME. But some applications, like Firefox, are not controlled by GNOME. The fonts will still be ugly. It requires a separate fix.

The same system which knows to look for fonts in your “hidden” fonts folder also knows to check for a certain configuration file named .fonts.conf — there's that leading dot again. If you told your file browser to show hidden files, then you could see if it was there. You aren't likely to have one yet. The fix is highly involved, and you are several lessons from understanding that if you've never used Linux. This is part of the same fix which works on just about every kind of Linux available, and I'm going to hand it to you on a silver platter. Just click this link and your browser should offer to save the file. If it simply displays it, that's okay, just use the browser menu to save it with the name I gave it on that website. If you download it, save it that way.

Now, go to your Home file window and click on the Downloads folder. You should find a “fonts.conf” without the leading dot. Chances are what is in there will work just fine for most computers, and will certainly do no harm. It's nothing more then encoded instructions telling the system to display Firefox and other non-GNOME stuff pretty much the same as GNOME stuff. Simply move it up one level into your Home folder, then change the name to add the leading dot. It should take effect immediately when you do. In case you don't know already, look at the window pane on the left for an icon with your username. It's drag-n-drop; drag the file from the list window and drop it onto the icon on the left side. It should move. Then click the up arrow in the icon bar at the top of the window. Find the file again, and right-click, selecting “Rename.” Type the leading dot in front of the name. Hit ENTER and you're done with this part.

Now, to really get things looking sharp, we have to actually change something in the system by rebuilding the font rendering library. Once again, it's that issue of Red Hat protecting themselves via an abundance of caution from vague copyright liabilities never tested in court. The threat recedes to near zero for us mere users, so we are going to fix it. That will be our next lesson, because it will serve as the introduction on using the RPMbuild system, which you will certainly need to know if you intend to use RHEL more than few days, or for anything more than the most basic tasks. So even if you think the fonts look fine as they are, you should follow along and learn how to build your own software packages.

Ed Hurst is Associate Editor of Open for Business.