I used to use liberation mono font on emacs (on X11) on an Ubuntu system using the following command and it worked great:
'(default ((t (:inherit nil :stipple nil :background "lightgrey" :foreground "gray20" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :width normal :height 120 :family "liberation mono"))))
'(font-lock-builtin-face ((((class color) (background dark)) (:foreground "Turquoise"))))
'(font-lock-comment-face ((t (:foreground "darkred"))))
'(font-lock-constant-face ((((class color) (background dark)) (:bold t :foreground "DarkOrchid"))))
'(font-lock-doc-string-face ((t (:foreground "lightblue"))))
'(font-lock-function-name-face ((t (:foreground "blue"))))
'(font-lock-keyword-face ((t (:bold t :foreground "steelblue"))))
; '(font-lock-keyword-face ((t (:bold t :foreground "CornflowerBlue"))))
'(font-lock-preprocessor-face ((t (:italic nil :foreground "CornFlowerBlue"))))
'(font-lock-reference-face ((t (:foreground "DodgerBlue"))))
'(font-lock-string-face ((t (:foreground "Aquamarine4")))))
It looked like this:
Our system admin upgraded to a new release of Ubuntu and now the font looks completely different in emacs. It doesn't look anti-aliased anymore, appears "less bold" and looks like this:
I'm trying to get it to look like it did before. Basically I want a font appearance that looks as close as possible to the Monaco fixed width font on Mac OS X, which on my terminal looks like this:
How can this be done? Ideas? Cannot figure it out. thanks.
You could always use the monaco font:
Create a new fonts directory
sudo mkdir /usr/share/fonts/truetype/mine
sudo wget http://usystem.googlecode.com/files/MONACO.TTF -O /usr/share/fonts/truetype/mine/MONACO.TTF
Update your font cache
fc-cache -f -v
Tell emacs to use the Monaco font. Add this line to your ~/.emacs:
Personally, I prefer it a little smaller than it appears with the default setting above, so I use
You could try using the lower-level set-frame-font.
(set-frame-font "Liberation Mono-14:antialias=1")
Change the 14 to whatever size you want. The antialias option should be self-explanatory; 1 for on, 0 for off.
You could also use things like Liberation Mono-bold-14:antialias=1 for bold text (or Liberation Mono-14:weight=bold:antialias=1.
If your height of 120 (in your original config) is important, add :height=120.
More detailed info in the official manual, although it looks like it doesn't list all the options.
It's been over six months since you posted your question. It's not clear that you found the answer.
See this page on Emacs Wiki: SetFonts. It has everything you need to know about displaying installed fonts to choose from and choosing one for Emacs.
I get the message
No fonts match '9x15'
when trying to run emacs and a linux box. I messed something up a while back, but I do not know how to fix this issue. Any ideas?
Have you installed Xming-fonts package and read Xming fonts page?
With X11, the fonts are from the server, in your case Xming running on a PC, not the system executing the client application (emacs running on the Linux is a X client).
This doesn't appear to be a Linux or emacs issue.
Does emacs still run? if so run M-x customize-group basic-faces - change the settings for default face, and save for future sessions.
M-x customize-group basic-faces
If not, run "emacs -q" (this suppresses loading your init file) and then customize your default face.