Thursday, March 3, 2011

Configure per font antialiasing on Ubuntu Linux

I wanted to use the Fixedsys font which is a very VERY nice font to program with, but as this font is a conversion from a raster monospaced font available on Windows only to a TTF version (thankfully someone made it, the download link is at the bottom of this post) I needed to disable antialias for just this particular font.

Thankfully (again) this was possible even on a per user basis:

On Ubuntu 10.10 I had to touch the ~/.fonts.conf file and add the following:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test qual="any" name="family" compare="eq">
<string>Fixedsys Neo+</string>
<string>Fixedsys Excelsior 2.00</string>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>

You just have to add your font name (the exact name) between those string blocks and any font you put there will be unaliased.

I barely scratched the fontconfig configuration, so I suspect many more things can be made or configured (I dream of a per app config for example, although I'm not sure of course).

I'm happy now with my Geany text editor (a really nice and fast GTK editor with a lot of good plugins) and my unaliased Fixedsys font.

Fixedsys font @ http://fixedsys.moviecorner.de/ (click on English version and go to the Further downloads tab, the font is the Fixedsys Neo+).

Geany text editor @ http://www.geany.org/

Cheers

No comments:

Followers

About me

Santa Fe, Argentina
Programador Web, PHP, MySQL, JQuery, Administrador Linux. LAMP, Lighttpd, Nginx.