tags:

views:

239

answers:

2

I would like to use Proggy font for my programming in Emacs. How can I set it up?

Please note it is a bitmap font.

+4  A: 

Hi,

you can use:

(set-default-font "ProggyClean")

which is deprecated and should be

(set-frame-font "ProggyClean")

from Emacs 23.1 on in you .emacs or you can do M-x: customize-face: default and set ProggyClean as "Font Family".

danielpoe
And where do I have to put the downloaded font?
Łukasz Lew
Hi Lukasz, you install the font the normal way, i.e. put it into $WINDOWS\FONTS folder or under linux in ~/.fonts and run fc-cache. No special emacs stuff required.
danielpoe
+1  A: 

Just sticking set-default-font in your .emacs won't work across multiple frames - each new frame will go back to the old default. Customize does work with multiple frames, but I've never managed to get it to work properly across different platforms (and different platforms have different font settings even for the same font).

So! This is what I've got in my .emacs. It works in linux, win32 and cygwin, and works with multiple frames (and hence emacs client).

(defconst win32p    (eq system-type 'windows-nt)  "Are we running on a Windows system?")
(defconst cygwinp   (eq system-type 'cygwin)  "Are we running on Cygwin?")
(defconst linuxp    (or (eq system-type 'gnu/linux)  (eq system-type 'linux))  "Are we running on Linux?")

;;font setups
(defvar vsc-little-font "" "*My lovely little font")

(when linuxp
  (setq vsc-little-font "ProggyTinyTT-8"))

(when cygwinp
  (setq vsc-little-font "ProggyTinyTT-16"))

(when win32p
  (setq vsc-little-font "-outline-ProggyTinyTT-normal-r-normal-normal-16-120-96-96-c-*-iso8859-1"))

(add-to-list 'default-frame-alist (cons 'font vsc-little-font))
(add-to-list 'initial-frame-alist (cons 'font vsc-little-font))
bbbscarter