journal: think

Fix Up That Linux Font Rendering

Required Materials

Linux (and that’s about it.)

Since this is a tech news site, I’m quite confident in my assumption that a large percentage of our readership has tried a Linux distro in some form or another. I’m also confident that, for a moderate portion of the aformentioned percentage, the distro in question was Ubuntu in one form or another. Now, I can also hazard that most found that the text rendering came up short compared to Windows or OS X. Like, Verne Troyer to Shaq short. Well, I can tell you that I fit neatly into all three categories. Lucky for you, me being the nice, problem-solving guy I am, I found a solution. What if I told you that there was a very simple way to turn that Verne Troyer you have into a Shaq? Yes, I mean metaphorically. I’m a level 8 spellsword, not a miracle-worker.

Now, esteemed, most likely interested, probably excited, maybe drooling (please get some help) reader, there is a solution. It’s a very simple solution, something I found refreshing after having to go through much more arduous methods for installing things (a .deb file here, a couple of .sh files there, and so on and so forth into infinity and back again 4 or more times.1) In only 10 lines of XML, you can have Shaq (oh look, there’s that metaphor again.)

But first, I have to make this tutorial take longer to read than it did to load, so I’ll show you a couple of before/after screenshots.

This screenshot shows the Sessions preference dialog without (left) and with (right) the font fix applied.

fontsfix_side-by-side_1.png

This screenshot shows how fixed-width fonts in the terminal benefit from the font fix. Without to the left, with to the right.

fontsfix_side-by-side_2.png

Lastly, this screenshot shows Epiphany (The Gnome Web Browser TM) displaying the default home page. To you left you can see what it looks like without the fix, and to your right, you can see what it looks like with the patch.

fontsfix_side-by-side_3.png

I’m sure that by now you’re probably sold if you were looking for a fix to the font rendering in both Gnome and KDE (haha, no metaphor, suckers!) So, without further ado, except for the copying and pasting, I give you the code2:

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

Just make a file called “.fonts.conf” (no quotes, but you already knew that) in your home folder, then log out and back in. There you have it. Your Troyer is now a Shaq (hey look, the metaphor is back. Don’t worry though, it’s almost the end of the article.)

1: Look ma! A hyperbole!

2: I got that code from the fine folks at ubuntuforums.org. Unfortunately, I couldn’t find the thread that had it. Instead, i give you this link to a site with a bigger file, but with the same result, which I found in another thread on ubuntuforums.org: http://www.michael-and-mary.net/?q=node/440


« Previous · think journal · Next »

thinkback

1.

Thanks Liam.  You were spot on that I’ve tried at least one Linux distro including Ubuntu.  It’s always good to improve the fonts and other visuals on Linux.  Good advice.

2.

great tip

Page 1 of 1 pages

respond

Have an account? Log in to leave your comments!

Commenting is not available in this weblog entry.