PerlStalker’s SysAdmin Notes

Notes from the life of a systems administrator

Setting the Default Monospace Font in XFCE

Originally posted at [2011-12-19 Mon 09:38]

I use XFCE4 on my box at work because it’s lightweight and still provides the features I want. I wanted to change the default font so that emacs used the font I wanted without having to change my .emacs file. Unfortunately, XFCE4 only lets you set system default but not the monospace font. Fortunately, XFCE4 uses fontconfig. All you need to do is edit $HOME/.fonts.conf and add this little XML snippet. (See the fonts.conf manpage.)

<match target="pattern">
        <test qual="any" name="family">
        <edit name="family" mode="assign">

If you have to create $HOME/.fonts.conf, make sure you wrap that snippet in <fontconfig> tags.