Segfault

Random Thoughts of a Scrambled Mind

Improved Font Rendering in Gentoo

EDIT: Updated to latest infinality (2010-11-14). Changed default fonts to Arial. Microsoft-fonts are available here.

EDIT II: The lcd-filtering overlay does not have an ebuild for the latest version of cairo. I have put together one ebuild (using latest patches from ubuntu and infinality). You can get it here. These ebuilds are now present in the lcd-filtering overlay.

Before I begin, full credits must go to PaulBredbury, Infinality and bi3l (gentoo-forums nick) who have done all the hard work on this.

Here’s my guide to get (what I believe) the best font rendering in Gentoo. Note that this uses ebuilds from an overlay, and thus is not officially supported by Gentoo. If you don’t know what an overlay is, look it up (and look up layman as well) on the internet. When you have your box configured to work with overlays, continue with this guide.

layman -a lcd-filtering

Add the following lines to /etc/portage/package.use


##LCD Filtering Overlay
media-libs/fontconfig lcdfilter -cleartype
media-libs/freetype lcdfilter -cleartype
x11-libs/cairo lcdfilter -cleartype
x11-libs/libXft lcdfilter -cleartype

Now, emerge the following packages. Take care that these packages are being emerged from the lcd-filtering overlay and in the exact same order.

emerge -av1 freetype fontconfig libXft cairo


The .fonts.conf configuration file that I use is based on the one provided by Infinality. The only change that I have made is chose Aller as the default sans and sans-serif font, OFL Sorts Mill Goudy ast the default serif font and Inconsolata as the default monospace font. You can edit the provided .fonts.conf if you want to chose other fonts as the defaults.
I have lost my alteration of .fonts.conf and the fact that I do not have currently have access to a Gentoo installation implies that I can not create and test a new one. In case you want to change the default fonts, you will have to do it via your DE or create your own .fonts.conf (if you work in a DE agnostic environment).

Install the fonts I use (if you want to). I would still recommend using these fonts though. They look brilliant.

  • Arial (media-fonts/corefonts)
  • Vista Fonts (Here)

Make sure your eselect fontconfig list looks like this (ignore the lohit family if you do not have it installed).


Available fontconfig .conf files (* is enabled):
[25] 50-user.conf *
[36] 66-lohit-assamese.conf *
[37] 66-lohit-bengali.conf *
[38] 66-lohit-gujarati.conf *
[39] 66-lohit-hindi.conf *
[40] 66-lohit-kannada.conf *
[41] 66-lohit-kashmiri@devanagari.conf *
[42] 66-lohit-konkani.conf *
[43] 66-lohit-maithili.conf *
[44] 66-lohit-marathi.conf *
[45] 66-lohit-oriya.conf *
[46] 66-lohit-punjabi.conf *
[47] 66-lohit-sindhi@devanagari.conf *
[48] 66-lohit-tamil.conf *
[49] 66-lohit-telugu.conf *
[50] 67-lohit-malayalam.conf *
[51] 67-lohit-nepali.conf *

Restart X and have fun!

Posted by Rahul on September 29, 2010 | Posted in Linux, Open Source | Tagged , , , | Comment