Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs font with antialiasing and hinting

I'm using Fedora 17 and Emacs 24 and wanted to try liberation fonts on Emacs. I've tried this with HOME/.Xresources:

Xft.antialias:  1
Xft.dpi:    96
Xft.hinting:    1
Xft.hintstyle:  hintslight
Xft.lcdfilter:  lcddefault
Xft.rgba:   rgb
Emacs.font: Liberation Mono-12

That changes only normal text, but not other text such as ORG-MODE headings. I don't know if antialiasing is working either.

I've also tried:

(set-fontset-font
nil '(#x0250 . #x02af) (font-spec :family "Liberation Mono"))

but it's still the same.

like image 895
damianjb Avatar asked Oct 23 '12 02:10

damianjb


2 Answers

Check to make sure that the org-mode faces are set to inherit correctly from the default face.

like image 103
db48x Avatar answered Oct 11 '22 09:10

db48x


I put the following bit of code in my .emacs.d to change the default font:

(set-face-attribute 'default nil :family "Ubuntu Mono" :height 120 :weight 'normal)

Whether the font is being anti-aliased and hinted is dependent on the program drawing the emacs window. So if you're running the X Windows version of Emacs inside Gnome or KDE, then Gnome/KDE will draw the fonts as hinted and anti-aliased. If you're running emacs inside a terminal, then you need to research how to use anti-aliased and hinted fonts inside the terminal (which if you're using a terminal emulator inside of a window manager is still tied to the abilities of the window manager itself).

like image 33
tanzoniteblack Avatar answered Oct 11 '22 10:10

tanzoniteblack