A few days ago I made yet another tweak to my Ubuntu laptop to make the fonts look a little better. The result is that I'm now quite happy--impressed even. Here are the three things I've done to make my day-to-day work easy on the eye.

First, enable subpixel smoothing in the System > Appearance control panel.

Ubutnu Font Rendering Settings

For a long time that's all I had done was was reasonably happy. Things looked okay but not great. But I used GNU Emacs for most of my coding and wanted fonts there that looked at good as those in gnome terminal.

That led me to the second tip: install emacs-snapshot and use the GTK version. Then you can add this to your ~/.Xresources file:

Emacs.font: Monospace-10

And bingo! The same font that's in your terminal is in Emacs.

That made me happy in Emacs, but my Firefox fonts were still a bit sucky. So when I read Tweak Your Font Rendering for Better Appearance in Tombuntu, I had to give it a try.

I created a ~/.fonts.conf file and added this to it:

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

I logged out and back in and suddnely found myself staring at fonts in Firefox that looked as good as I've seen in Safari on a Mac.

That's all there was to it for me: subpixel rendering, emacs-snapshot, and enabling hinting via a .fonts.conf file.

It's worth noting that you can go even farther with the advanced font settings, but I really haven't needed to go that far yet.

Posted by jzawodn at October 22, 2008 08:57 AM

Reader Comments
# said:

My favorite font for terminal use has to be Bistream Vera Sans Mono, which is included with Ubuntu and many other distros. It's an amazing font that looks great.

on October 22, 2008 01:47 PM
# Seth said:

Thanks! The tip about ~/.font.config fixed a whole slew of my font issues on linux.

I knew the time I spent on your feed was worth it!

on October 22, 2008 03:45 PM
# Dan Diephouse said:

It still looks horrible compared to Windows or Mac IMO.

on October 22, 2008 05:36 PM
# Craigslist is broken said:

Craigslist is terribly broken, someone has put some crude and non-transparent keyword crap in there that make it impossible to post most ads. 2 weeks with no fix now. The best site on the net is being destroyed.

on November 2, 2008 09:01 AM
# Kraig said:

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

on November 5, 2008 10:09 PM
# Chris said:

This is a non-related question to this post, but how is your Ubuntu's laptop battery life? Have you tweaked much in this area? Would love to hear your thoughts.

Chris

on November 14, 2008 10:18 AM
# Danesh said:

I think this on by default in 9.04

on June 5, 2009 06:16 AM
# TJ said:

Hi Jeremy! Your information regarding screen type appearance is very informative and well-presented. As I am new to Linux (I took a Red Hat 7.5 course at a local college some years ago without a GUI), what is the name Ubuntu's default font (Is it TrueType or PostScript)? And secondly, are the Ubuntu pre-installed font(s) TrueType or PostScript? I know that life was worse than Hades back in the 90s when I had to rely on Font Management utility software to keep PostScript and TrueType fonts from clashing and corrupting themselves inside the MacOS when I was using Microsoft Word (which they still did anyway!). Well, since then, I've been using XP up until now, and since I can no longer afford to "keep up with the Joneses", as XP support fades away, my plans are to budget for a new, 64-bit box, donate my 700x Gateway Tower, and then make the switch to Linux.

on September 14, 2009 08:15 PM
Disclaimer: The opinions expressed here are mine and mine alone. My current, past, or previous employers are not responsible for what I write here, the comments left by others, or the photos I may share. If you have questions, please contact me. Also, I am not a journalist or reporter. Don't "pitch" me.

 

Privacy: I do not share or publish the email addresses or IP addresses of anyone posting a comment here without consent. However, I do reserve the right to remove comments that are spammy, off-topic, or otherwise unsuitable based on my comment policy. In a few cases, I may leave spammy comments but remove any URLs they contain.