When my Emacs was upgraded from 23.1 to 23.2, I got negatively surprised: It changed font rendering, making fonts significantly less readable. I quickly identified the corresponding NEWS entry:
*** On X11, Emacs reacts to Xft changes made by configuration tools, via the XSETTINGS mechanism. This includes antialias, hinting, hintstyle, RGBA, DPI and lcdfilter changes.
But I didn’t know anything about Xft and XSETTINGS. I started to look for a quick solution and tried to install and use common desktop configuration tools such as gnome-control-center, systemsettings and xfce4-settings. I’ve found that font adjustments apply in Emacs only when using the GNOME tools. So running gnome-settings-daemon was necessary and it was very annoying: It changes keyboard layout on startup and after switching back to X from console, breaks multimedia keys, pops up annoying dialogs on various occasions, etc. and I couldn’t find a way to prevent all the odd behavior.
Now I’ve finally got rid of it. I discovered Xft font properties can be set simply via X resources. After some testing and elaboration I ended up with the following new lines in my ~/.Xresources
:
Xft.antialias: 1 Xft.hinting: 1 Xft.hintstyle: hintslight Xft.lcdfilter: lcdnone Xft.rgba: none
Now fonts in Emacs look fine again and gnome-settings-daemon is no longer present on my computer.
Leave a Reply