Tombuntu

Tweak Your Font Rendering for Better Appearance

Everyone has their preference on how they think fonts should be rendered. If you’re not happy with the appearance of fonts on your system there are a few easy tweaks to try for better rendering.

Your first stop is the GNOME’s configuration settings for fonts, located in System->Preferences->Appearance under the Fonts tab. If you’re using an LCD display make sure you have the subpixel smoothing rendering mode enabled. Click Details to get access to the hinting options. Play around with these to get a result you like.

Here’s a sample of my system’s fonts configured with these settings:
fonts with simple settings

There are many more options for font rendering available with a .fonts.conf file. This file, from this forum post, turns on a hinting feature that is usually disabled due to patent issues with Apple.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
</fontconfig>

Copy and paste the text above into a text file, and save it in your home directory as .fonts.conf (note the first period, this file will be hidden). Log out for the changes to take effect. Here’s a sample of fonts with this file:
fonts with .fonts.conf

A more complex .fonts.conf file, available for download at this site, produces very smooth and bold fonts similar to those in OS X. Here’s a sample:
fonts smooth and bold

For now I’ll be using the simple .fonts.conf file, the differences between it and the default are subtle but it seems to make text clearer. Are you satisfied with font rendering on your Linux system?

Archived Comments

William

Wow, I used the config file from the linked website. The results are impressive. Everything is consistenly smooth and soft. I turned my application fonts down to sans 8pt, and on my netbook at 1024 x 600 you can still read everything just fine.

Thanks a mil,

-William

George

I have it set up as in the second example. It’s the best of the bunch, in my opinion. But I had to dig quite a bit to find out how to get it that way. It’s nice to see it all condensed into this concise post.

lingrlongr

not bad. i compared the 3rd method with what i normally do, and the 3rd method text appears to be too blurry around the edges.

what i’ve found to be the best is to go to system > preferences > appearance > fonts > details. click the radio buttons next to “Subpixel (LCD)” at the top, and “Slight” at the bottom.

i think the fonts look great with that setting…

k

Mackenzie

That last one is how OSX renders fonts? That’s naaasty…so blurry! I disagree on always using subpixel smoothing for LCDs. I use the Best Contrast setting. The subpixel smoothing results in very blurry text.

Jaime Iniesta

Hey Tom, thanks for the tip I tried with the simple config and the difference is subtle, but noticed!

BobCFC

On the subject of fonts, please can I spread the word about the new Droid Sans font!

I read about it on Launchpad and there is a big discussion about using it as the new default Ubuntu font.

As the name suggests it comes from the Google Android SDK and is opensource so no copyright issues.

It looks amazing as a document font for webpages in firefox (size15) and is also pinpoint sharp as a small system font, even at 7.5pt. I was a happy Liberation Sans user but I am sticking with this for LIFE.

The Android filesystem that this came from is a 50mb download so I rezipped the font on its own here about 1.7mb:

http://rapidshare.com/files/154385314/droid.fonts.tar.bz2.html

Also, if any programmers want a great Monospace font check out Inconsolata:

http://www.levien.com/type/myfonts/inconsolata.html

Mackenzie

@Bob:
Sorry, but the Droid font is bad. It’s made for funnily tiny resolutions like the phone, but for real screens, it’s bad. The weight is distributed all wrong so it becomes distracting. A very good, in depth analysis was done here: http://troy-sobotka.blogspot.com/2008/07/why-droid-isnt-answer.html

yungchin

Thanks, that was interesting to play with. The suggested fonts.conf indeed makes webbrowsing (with Epiphany) prettier, but somehow the fonts in the Gnome terminal appear more narrow with it.

Since I spend most of my day in a terminal (with screen and vim), I removed the conf file again…

Dieter Spahn

Hi Tom,

Sorry, but your tip regarding font rendering in Ubuntu is only half the truth! Did you ever had a look at font rendering after running a sudo command, ‘gksu natilus’, for example. The fonts are ugly as before! Therefore, I guess that the .fonts.conf file should also be placed into the /root directory, or I’m wrong?

Best regards
Dieter

lapubell

does this file get used by KDE too? or is this a gnome only fix?

slumbergod

I used the second method since it seemed quickest. At first I wasn’t sure that it made much difference. A day on and I realise the improvement is quite significant. I wish I’d know how to do this a year ago when I switched from Windoze!!!

Thanks for the tweak. It’s one of the most useful I’ve used.

Tom

Dieter Spahn:
You’re right, ~/.fonts.conf is a per-user setting. Putting a copy of the file (or a link to it) in root’s home is necessary for apps running as root.

lapubell:
Yes, the file should be used by any desktop environment.

Chris Lees

The fonts are much more readable without the anti-aliasing, but at least your anti-aliasing demonstration isn’t as blurry as the text in IE 7.

What amazes me is that people complain about the text rendering in Ubuntu; “How do I make the fonts as sharp as Vista?“.

And it’s not just a case of me preferring the full hinting because it’s different to what the other operating systems provided. I always used to turn off the anti-aliased text in Mac OS 8 because it simply looks crap.

Matt

Somehow the second font smoothing option (Apple’s related) is a little blurry. As a result, my eyes have to try harder to “focus” on it.

And, as a technician that has to work on Apple computer all day, Titanium running Leopard to be specific, OSX has the worst font smoothing. I tried different settings from light to auto in System Preferences, the text still look jaggy. It also has to do with the way Apple choose the contrast/brightness of the screen.

pt

Using the the link to the the complex settings is giving me stunning fonts.

Thanks a lot.

Eat it apple fan bois

Decoy

Thanks for the tip! Really great! BTW, I didn’t relogin and rendering of fonts improved gradually!

Jabba

I tried both config files and I prefer the first one. Thank you very much for this tip, the difference is significant.

Donncha O Caoimh

Tried the first idea with the config file and Google apps like Reader and Gmail look horrible on my LCD monitor. I’ll be reverting back once I get a chance.

Jesper

I tried the autohint option with .fonts.conf, and the fonts do look nice, but unfortunately I noticed that some letters in some fonts look strange.

For example, some capital letters in some fonts are higher than they should be. I turned the option off again.

I’m happy with the subpixel smoothing option that’s available in the configuration dialog.

Hewzey

This sorted my fonts right out! I only recently started using ubuntu and love it but was getting blurry eyes from the screen fonts. Also when opening anything with fonts it took a split second for the focus to apply. This has also sorted that out. Like the others have said this is a subtle tweak but very nice.

Many Thanks!

OrelEagle

This tip is nice, but you haven’t answered the most important question: which font are you using?

I’ve tried DejaVu Sans, Liberation Sans and Droid Sans, but it doesn’t seem to be one of those…

Anonymous

I am not satisfied. Can you provide the solution for vista like font rendering in linux?

rexjoec

Ascender just released OpenType Pro versions of the Droid fonts here: http://www.droidfonts.co?m. This might be interesting to creative professionals who would like to use the Droid fonts in their design projects.

Adrian_Shrico

Does this form of font rendering customization also work with Mac OS X 10.410.510.6?

Tom

I doubt it, I’m pretty sure Apple has their own font rendering technology.

Gpldom

Used the simplified .fonts.conf. Stunning font rendering! My only concern is about bold fonts rendering may be something special is needed for bold fonts.

Anyway thank you

Distro: LinuxMint 7

Francisco

Thanks! Works Like A Charm!

Respond via email