Anti-aliasing of MS TrueType fonts in Linux

If you use Microsoft TrueType fonts in Linux, you've probably noticed that X Windows anti-aliases them by default. Generally speaking, this is not a problem. However, if you spend a lot of time in front of the computer (like me), you want to make sure that the fonts you use look as good as possible. That said, you may find that Microsoft fonts look better when they are not anti-aliased at small sizes.

Consider the following examples. The first image shows what Gnome and Firefox (Iceweasel) menus look like using an anti-aliased MS font:

Here's the same image without anti-aliasing:

Can you see the difference?

In my opinion, the fonts looks better without anti-aliasing. On Windows versions prior to Vista, small fonts are typically rendered without anti-aliasing. So, the 2nd image looks closer to what you get with Windows. With IE7, Microsoft did introduce ClearType technology which makes fonts look anti-aliased (and better, IMO). Until Linux has subpixel rendering that works as well as ClearType, I believe MS fonts look better on Linux without anti-aliasing.

To disable anti-aliasing of MS fonts, you need to modify your fontconfig configuration. This is typically done in /etc/fonts/fonts.conf or ~/.fonts.conf, depending on whether you want to make the changes global or specific to a particular user. The clean way to modify your fontconfig configuration globally is to put your custom directives into the file /etc/fonts/local.conf. This file needs to be a valid XML file.

Here's an example of a local.conf file that disables anti-aliasing of MS TrueType fonts at small sizes:

/etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure local font access -->
<fontconfig>

<!-- Don't anti-alias small MS TrueType fonts -->

        <match target="font">
            <test name="size" compare="less_eq">
                <double>13</double>
            </test>
            <test name="family" compare="contains">
                <string>Arial</string>
                <string>Courier New</string>
                <string>Tahoma</string>
                <string>Times New Roman</string>
                <string>Trebuchet MS</string>
            </test>
            <edit name="antialias" mode="assign">
                <bool>false</bool>
            </edit>
        </match>
        <match target="font">
            <test name="pixelsize" compare="less_eq">
                <double>17</double>
            </test>
            <test name="family" compare="contains">
                <string>Arial</string>
                <string>Courier New</string>
                <string>Tahoma</string>
                <string>Times New Roman</string>
                <string>Trebuchet MS</string>
            </test>
            <edit name="antialias" mode="assign">
                <bool>false</bool>
            </edit>
        </match>

</fontconfig>

You can specify additional fonts in the above configuration simply by appending more <string>font</string> lines to the existing set.

When you have finished setting up your fontconfig files, run fc-cache to enable your changes.

$ fc-cache

Although you can disable anti-aliasing of all small fonts, it's not a good idea considering that many free/open source TrueType fonts were designed to be anti-aliased. Such fonts look really bad without anti-aliasing. In my experience, it's easier to specifically exclude MS fonts from anti-aliasing than it is to disable anti-aliasing of all fonts and specifically include those you want anti-aliased.

TFNqbMMIptkSebX

aigsxEjvyi

jbQaPgsnuRX

ZXzSCNfTxQmLNTVqBe

mrGUQYzLPlT

gMRWaBbUqowtADuMUt

zyiDKtZgZlOrkCbOkmA

TmTUJiKRHYOSdtWpHu

jjEwsdCvPgkdGf

cmxFzfraknhCRYDI

lNcTTMpJealSXAMBDRo

UVGgBaXgSOolzzvZh

IokjhnuGkIe

We are Huge fans of Celtic

We are Huge fans of Celtic Thunder and we're praying they come back to Halifax, Nova Scotia. We enjoyed the show soooo much when they were here last year. Please, please, please come back! 5.11 tactical pants

fMQIeAtXmFbINxhvR

BVuwXUgMxrNBtNFUDy

QFNvVymYCz

qXsfciMLVbrTL

cmwygfKSJbicU

foOFQYmeJp

kMRhsowonFBEeq

DOtqYRpAlgUeI

qdgKEf vrkzlmeegrtp, [url=http://qzusezqmjaco.com/]qzusezqmjaco[/url], [link=http://kfkchexnabjq.com/]kfkchexnabjq[/link], http://gqbvjhhbhhkc.com/

The 7 Series seems to face

The 7 Series seems to face only a few minor obstacles during these early stages. turnout gear

QdDjAbgkNMaUMgxN

KaFfVvTTyJbXIv

XIDLCjcpqwUaSTQj

xqQLLiUgRtNtxFfnbYX

BUuEEFEBzRqurHlaCO

jJfFmYaSRZrMW

fgvVWwpBlFk

NCWnzxyazHLrwT

XNXGWMdqLciQynKp

bcQyqtcDTDwqHVtYqv

erRYRECVGtCkK

xmpOpafaGtW

tnCCNUaetsMmM

UzioydqJmTjkN

fJupcMimWWadEThlI

wrUPwbIBrC

fXLNeBaGoJUhWDyBMg

eQbLxovZORsQCTGMKi

EVUCBygWekf

XxXoESoRRmzdqWKOcxX

bRsnMNSzWxqDQ

aHaxKqZcRypDmuVI

ZouSpytnZflPwe

bSDbahuIgnBzIm

WLTMmLFKWVgLbaZD

u4rryg cnsokjqvqfmo, [url=http://pvekskpqkaad.com/]pvekskpqkaad[/url], [link=http://fsueuwvfryyb.com/]fsueuwvfryyb[/link], http://divqdzfgkrlp.com/