Using Sharp Fonts On A GNOME Desktop - Page 3

5 Configure GNOME Font Preferences

Now we have to tell GNOME which fonts it should use for applications, on the desktop, in window titles, etc. Go to System > Preferences > Font:

Select Tahoma (8 pt.) for Application font, Document font, Desktop font, and Window title font, and Monospace (10 pt.) for Fixed width font. Also make sure that Subpixel smoothing (LCDs) is enabled:

 

6 Create A .fonts.conf File In Your Home Directory

To control the behaviour of our fonts (anti-aliasing, hinting, font sizes to be smoothed, etc.), we can create the file ~/.fonts.conf. This is an XML file. After lots of experiments I found that this one works the best for me:

gedit ~/.fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Give all fonts light hinting and subpixel smoothing -->
<!--
<match target="font">
    <edit mode="assign" name="rgba">
        <const>rgb</const>
    </edit>
    <edit mode="assign" name="hinting">
        <bool>true</bool>
    </edit>
    <edit mode="assign" name="hintstyle">
        <const>hintslight</const>
    </edit>
    <edit mode="assign" name="antialias">
        <bool>true</bool>
    </edit>
</match>
-->

<!--
     <match target="font">
        <test qual="all" name="rgba"><const>unknown</const></test>
           <edit name="rgba" mode="assign"><const>rgb</const></edit>
     </match>
-->

<!--  Do not smooth Fixedsys  -->
<match target="font">
    <test name="family">
        <string>FixedsysTTF</string>
    </test>
    <edit name="antialias">
        <bool>false</bool>
    </edit>
</match>

<!--  Do not smooth Tahoma 8pt and under  -->
<match target="font">
    <test name="family">
        <string>Tahoma</string>
    </test>
    <test compare="less" name="size" qual="any">
        <double>9</double>
    </test>
    <edit name="antialias">
        <bool>false</bool>
    </edit>
</match>

<!--  Do not smooth Times New Roman or Courier New for 12pt and under  -->
<match target="font">
    <test name="family">
        <string>Times New Roman</string>
    </test>
    <test compare="less" name="size" qual="any">
        <double>13</double>
    </test>
    <edit name="antialias">
        <bool>false</bool>
    </edit>
</match>

<match target="font">
    <test name="family">
        <string>Courier</string>
        <string>Courier New</string>
        <string>Courier 10 Pitch</string>
    </test>
    <test compare="less" name="size" qual="any">
        <double>11</double>
    </test>
    <edit name="antialias">
        <bool>false</bool>
    </edit>
</match>

<!-- Do not autohint Courier New, Fixedsys, Tahoma, or Times New Roman -->
<match target="font">
    <test name="family">
        <string>Courier New</string>
        <string>Times New Roman</string>
        <string>Tahoma</string>
        <string>FixedsysTTF</string>
    </test>
    <edit mode="assign" name="hintstyle">
        <const>hintslight</const>
    </edit>
    <edit mode="assign" name="autohint">
        <bool>false</bool>
    </edit>
</match>

<match target="pattern">
            <test qual="any" name="family">
                    <string>Bitstream Vera Sans</string>
            </test>
            <edit name="family" mode="assign">
                    <string>Arial</string>
            </edit>
</match>
    <match target="pattern">
            <test qual="any" name="family">
                    <string>Helvetica</string>
            </test>
            <edit name="family" mode="assign">
                    <string>Arial</string>
            </edit>
</match>
<match target="pattern">
            <test qual="any" name="family">
                    <string>Palatino</string>
            </test>
            <edit name="family" mode="assign">
                    <string>Georgia</string>
            </edit>
</match>
</fontconfig>

(If you'd like to find out more about available configuration options, how to use that file, etc., please refer to these pages:

)

Each time you modify ~/.fonts.conf you must log out of GNOME and back in for the changes to take effect, so please log out now and back in.

After you've logged in again, you should now see that your fonts look exactly like on the After screenshots in chapter 2!

If you want GTK1 applications to use Tahoma, too, please create the file ~/.gtkrc.mine with the following contents:

gedit ~/.gtkrc.mine

style "user-font"
{
  fontset="-microsoft-tahoma-medium-r-normal-*-10-*-*-*-p-*-*"
}
widget_class "*" style "user-font"

 

7 Links

Share this page:

10 Comment(s)

Add comment

Comments

From: at: 2007-04-05 15:51:07

Am I the only person that likes the "Before" images better than the "After" ones? I personally can't stand sharp, non-smoothed fonts  

I love the font smoothing in Linux, it's much better than Windows' ClearType :). Speaking of which, Debian's font smoothing 'out of the box' seems to be a lot better than Ubuntu's (I have no idea why this is...).

From: at: 2007-04-09 10:32:00

The Anti Aliased fonts offered by Ubuntu are much better than those displayed by Windows. Somehow I've never liked the way Fedora have done their font rendering - its too smooth. The major reason for shifting to Ubuntu (& Debian) was the way fonts were rendered on screen.

 In my opinion Anti Aliased fonts make for a rich & pleasant user experience.

From: at: 2007-05-02 08:05:00

I recently installed Ubuntu 7.04 and while I'm not totaly happy with the fonts atm the before pictures look better than the after pics.

From: Vexorian at: 2009-02-14 16:31:03

You are not alone. I started having headaches after changing my CRT with a LCD, but the after shot fonts still look blurry to me, and even harder to read. ouch.

From: Zwopper at: 2009-03-04 14:56:33

I can't stand MS crappy font rendering.

Whenever I stumble on them at work it makes me cringe (everyone here hasn't seen the light yet! - we have 50-50 Linux-Windows installation the atm).

Font smoothing FTW!

 

From: at: 2007-05-07 16:03:03

Hi,

I found this guidesP>

http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_improve_sub-pixel_font_rendering_for_Feisty

or

http://ubuntuforums.org/showthread.php?t=343670

This will dramatically improve the appearance of fonts with respect to the default Ubuntu install...

From: at: 2007-11-23 20:50:41

I definitely love the way the Microsoft fonts look. It gives a clean and professional look. Here's a side-by-side comparison of polished vs. sharp fonts: www.sharpfonts.com

From: at: 2008-04-08 08:01:46

I Cannot believe how many people think that these Antialiased fonts look good!!

15 minutes working on any machine with them and I have a stinking headache

I have Worked hard to figure out how to disable them  on my Work XP and Vista machines, including the separate setting withing the applications IE, and Office 2007. It sis set individually for the OS and Both IE and Office ovrride the OS's settings with their own. I have turned off them both and have just found another module in office that still has them on.

 I use computers all day ( HP Laptop ), and I have Very good eyesight,  and cannot understand why everyone puts up with this crap from the marketing people telling them that it is actually better.

Ken

 

From: Anonymous at: 2009-07-02 16:07:30

Some of the characters in the Tahoma font dont seem to render properly.

Particularly, 8 and v. These are visible from closely looking at the screenshots. I believe this problem is documented elsewhere. Can you propose any solution?

 

From: at: 2007-11-07 13:27:52

Here's another tutorial: http://www.sharpfonts.com