Main Menu
Woot Alarm
Zen Kernel
Dish Keys
Search Bible
Feed Me!


Add to Google

Add to Pageflakes

Subscribe in Bloglines

Add to My AOL


3 Simple Steps to Font Perfection in Linux
Sunday, 16 September 2007
2008-07-08: local.conf syntax fixed.

This one doesn't just apply to KDE, it applies to every Linux window manager out there. I suggest that before going through this guide, you go through either the KDE or Gnome guide for sharp fonts first, to get your DPI settings correctly set, and get font settings to be the same for your GTK apps, too.

( to enlarge in new window/tab)

Once you have done that, these 3 simple tweaks will simply amaze you by the clarity and beauty of the fonts on your Linux box. You will need to have the Microsoft fonts installed for any of these tweaks to work. I found these while Googling, and can't remember the addresses. Credit goes to the original writers of this code, though.  It's time I stop rambling on, and get on to the good goes!

Tweak 1:  /etc/fonts/local.conf Get Rid of Ugly Fonts

    Wherever your font config information is (usually /etc/fonts/local.conf), you need to edit or create the local.conf file, and paste this inside and save:

<match target="pattern">
    <test qual="any" name="family">
        <string>Bitstream Vera Sans</string>
    <edit name="family" mode="assign">
<match target="pattern">
        <test qual="any" name="family">
        <edit name="family" mode="assign">
<match target="pattern">
        <test qual="any" name="family">
        <edit name="family" mode="assign">
<match target="pattern">
        <test qual="any" name="family">
        <edit name="family" mode="assign">
                <string>Times New Roman</string>

What this does is replace the ugly default system fonts with the nice proprietary Microsoft fonts, which are much clearer, and look better anti aliased. Make sure you have them installed. You can do this to replace any fonts you don't like.

Tweak 2: userChrome.css Make Firefox's toolbars and menus use nice fonts

This tweak makes Firefox use Tahoma for its toolbars and menus. Feel free to change it to whatever font you prefer. Usually, this goes in /home/yourname/.mozilla/profiles/yourprofile/Chrome/userChrome.css create it if it doesn't exist in the Chrome folder.

    font-size: 10pt !important;
    font-family: Tahoma !important;

Tweak 3: userContent.css Make website buttons look good

Despite these tweaks, you can sometimes end up making the buttons on various websites too big or too small. This fix takes care of that in /home/yourname/.mozilla/profiles/yourprofile/Chrome/userContent.css create it if it doesn't exist in the Chrome folder.

input, textarea, select, button,
input[type="button"], input[type="reset"], input[type="submit"] {
    font-size: 8pt !important;
    font-family: Verdana !important;

That's it! Wasn't that easy? Now, restart your xserver, and see how everything looks! Isn't it beautiful?

webgk   | |2007-09-25 00:19:12
I can see my email id in the comments. I don't liked that at all. You must
remove that. Thanks.   | |2007-09-25 00:21:01
It would be good if you can put website address instead of email, you will get
loads of comments.
It's for that.   | |2007-09-25 10:09:11
Hey, that's a great hack. I have always wonder why my blog always looked weird in linux. I would like to apply this
right away. Thanks.
Mike   | |2007-10-01 08:47:56

Excellent article! I'll have to try it on my...TA DA! Linux
installation! Having discovered that Mandriva 2007 works perfectly on my
system :grin , I decided to dual-boot with XP to take advantage of all the good
free Linux software. Being a super-ultra newbie in Linux, this will be my first
tweak to try.

See ya later,

Krilli   | |2007-10-02 15:10:26
This is pretty clever. Props.

An ideal scenario would be to get a better
rendition of Helvetica and Times, rather than using Arial / Times New Roman. As
far as Helvetica-a-likes go, Arial is actually pretty bad, though it is better
than some Helveticas I've seen included in Linux.

If one were to rip
Helvetica and Times off a Mac OS X box, matters should be pleasant.
Only registered users can write comments!

3.25 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."


© Matt Parnell's Brain: Plugged In!