Fonts Emacs HOWTO

Aug152007

Checking font availability
To check if some font is available in emacs do following:

1.Switch to *scratch* buffer.
Type: (prin1-to-string (x-list-fonts "font-you-whant-to-check or pattern")).
2.Place the cursor after the last closing paren and hit C-j.
List of the names of available fonts
matching given pattern will appear in the current buffer (*scratch*).
3.For listing of all available fonts use (prin1-to-string (x-list-fonts "*")).

Which font emacs uses now ( default font)?
Sometimes you want to know what is your default font (font of
default-face), i.e. font you currently use in emacs.
You can do this by performing the following steps :

1.Switch to *scratch* buffer.
2.Type: (frame-parameter nil 'font).
3.Place the cursor after the closing paren and press C-j. Name of default font will appear in current buffer (*scratch*).