Prosthetic Conscience

Jason McBrayer's weblog; occasional personal notes and commentary

Wed, 19 Apr 2006

Getting the best font rendering possible on Fedora Core 5

Every time I upgrade between FC versions, the freetype library gets updated. Because Fedora doesn’t ship freetype with the bytecode interpreter enabled (for patent reasons), getting the best out of your fonts may require some changes. This time, rather than just recompiling the freetype RPM, I messed around a bit more with font rendering, and came to some conclusions.

If all your apps use XFT/Fontconfig

There are three hinting methods available in Fontconfig: none, bytecode interpreter, and auto-hinter. The bytecode interpreter would normally be the default, but Fedora compiles it out. However, the autohinter does a very good job, as long as your fonts are antialiased. Most people will use antialiased fonts whenever they can, and there are relatively few apps still in wide use that do not support antialiased fonts. If this is the case for you, you don’t need to install a new freetype library. Just turn on autohinting by adding this to /etc/fonts/local.conf:

<!–
  Use the Autohinter
–>
<match target="pattern">
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
 

If some of your apps use X core fonts

The above isn’t good enough for me, unfortunately, because I still use some apps that use X core fonts (not antialiased). Well, only one, actually — GNU Emacs. While the auto-hinter is plenty good for antialiased fonts, it doesn’t provide the pixel-perfect hinting that you really need to work with non-antialiased fonts. Straightforward to do:

Then you’ll need to restart xfs, and possibly restart X (‘xset fp rehash’ may or may not allow your programs to work).

Now make sure your core-font-using programs are using programs with good hinting, such as the Vera fonts or the MS Web Fonts. You should now have properly shaped, minimally jaggy non-antialiased fonts.

[ Posted: 20:12] | [ Category: ] | Permalink | Comments: 0 ]

 


Powered by PyBlosxom