Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Enable Smooth fonts on Ubuntu Linux

Ubuntu Linux has an option for font smoothing that isn't turned on by default for some strange reason. This makes fonts significantly smoother, enough to be very noticable.

To enable this option, you need to edit the .fonts.conf file in your home directory. To create and open the file, run this command and paste in the xml data below it.

gedit ~/.fonts.conf

Paste in this text:

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

You'll have to log out and back in to see the difference.

Here's an image of the before:

And here's an image of the after:

Definitely looks smoother, and is much more readable on my laptop screen.

Tested on: Ubuntu Dapper and Ubuntu Edgy.

Update: Some angry people on digg have pointed out that the original source for this was this Ubuntu Forums post. While I didn't find it there, I'm going to link back to it, just to be fair.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 10/13/06 and tagged with: Ubuntu, Ubuntu Tips & Tweaks

Comments (16)

  1. Brent

    Yes, that "strange reason" you are wondering about is that Apple has a patent on what it called "subpixel font-hinting", i.e. basically the use of RGB colors to create smooth gradients across areas the size of a fraction of a pixel. Linux distros, including Ubuntu, turn this technology off by default because distributing it in the US with it turned on would violate Apple's intellectual property.

  2. The Geek

    Brent, thanks for the info… I wasn't aware of that. Good to know.

  3. Diego

    Does it works on Debian unstable? (i don't wanna try :P )

  4. ScottE

    I call BS. It's not disabled due to patents - if that was they case, they could not have that function at all.

    I don't know about for gnome, but for KDE it can be enabled in the settings…

  5. Andrei

    What about:
    dpkg-reconfigure fontconfig-config? It creates/links the proper configuration files in /etc/fonts/conf.d, making it system-wide.

  6. amir

    ScottE
    US software patents are very wierd. Basically you can patent concepts. The upshot is that sophisticated technologies cannot 'officially' be used to do particular things that they're easily capable of. Software patents are BS!!

  7. silencer

    Gnome lets you enable and configure the type of antialias. In fact, it comes enabled by default.

  8. nate

    You are going to have to come up with a link backing up what your saying, because I don't beleive you either that it's patents.

    It wouldn't be present in the software I figure. If it's aviable optionally it would be a compile time option and would require you recompile the library to enable it. That is generally how these things are done.

    It may be disabled because of performance reasons, or it hurts readability on low-resolution displays or something like that. Or it can be disabled 'just because' that is how it's shipped from the upstream programmer and that's it.

  9. Riddian

    Just in case anyone wants to make this mod apply to all users I place this file in /etc/fonts/local.conf

    This also fixes any problems that might occur when programs run as root fail to pick up the font settings.

  10. nationofgreg

    If publishing it were due to patents, they wouldn't be able to use it - period. Someone else would be able to provide it, but by simply shipping it IN their technology, they'd be violating the patent.

  11. Bob

    It's not that difficult and it's not a patent thing, it's just easier for them to use normal anti-aliasing by default instead of detecting whether or not the user has an LCD and which color order that LCD uses … System > Preferences > Font. In the Font Preferences window, click on the "Details…" button to use sub-pixel instead of just standard anti-aliasing.

  12. yo momma

    not much difference , but a good way to start improving the defaults

    linux needs a huge face lift so it can catch up to windows , not to mention mac, (looks wise)

    gnome is leading the way but when you compare it to osx interface, it looks outdated,

    KDE is ok but trailing behind gnome ,it still has that 1995 feel to it , i don't like it ,

  13. zorg

    Have you ever used Beryl-Compiz? It blows Vista away.

  14. Joe User

    not much difference

  15. Hank Heathen

    @ ScottE, nate, nationofgreg, and Bob:

    http://www.freetype.org/patents.html

    Try Googling freetype + patents

    A 2 word websearch could have prevented your pointless posts.

  16. Fred

    If you had read that page you would have realized that it has nothing to do with font smoothing. The two patents that Apple holds are on OpenType-specific hinting embedded in font files. Enabling use of the data is a compile-time option in FreeType. FreeType will also guess based on the glyph shapes in other fonts that lack the data, and in OpenType fonts if the support is compiled-out. I'd bet a dollar Ubuntu ships it "free".

    It has nothing to do with smoothing or sub-pixel hinting AT ALL.


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.