[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defining default face
From: |
Allan Gottlieb |
Subject: |
Re: defining default face |
Date: |
Mon, 08 Sep 2008 14:53:04 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
At Mon, 08 Sep 2008 09:53:37 -0300 Rodrigo Canellas
<rodrigo.canellas@tqtvd.com> wrote:
> I used 'set-default-font' to choose
> "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1", but I
> do not know how to edit '.emacs' to make it permanent... could anyone
> help me?
The simplest way is probably to use .Xresources (assuming you are
using X). Mine is
*Term*font2: 10x20
*Emacs*font: -bitstream-Bitstream Vera Sans
Mono-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1
*Emacs*menuBar: off
*Emacs*toolBar: 0
I also have an overblown method for changing the fonts and by
experimenting have found the right sizes for 1-up, 2-up, 3-up, and
4-up (this depends on the screen res, mine is 2560x1600).
The code below is from my .emacs. I run v23.0.60.
allan
;; Common fonts
;;
(defun ajg-set-font (f)
"Set current and future frames to have font F"
(interactive "sFont name (no quotes): ")
(setq font-dotted-pair (cons 'font f))
(setq default-frame-alist
(cons font-dotted-pair (assq-delete-all 'font default-frame-alist)))
(set-default-font f))
(defun ajg-set-mono-font (size)
"Set bitstream mono SIZE font for this and future frames"
(interactive "sSize of bitstream mono font (no quotes): ")
(ajg-set-font (concat
"-bitstream-Bitstream Vera Sans Mono-normal-normal-normal-*-"
size "-*-*-*-m-0-iso10646-1")))
(defun mono12-font () (interactive nil) (ajg-set-mono-font "12"))
(defun mono14-font () (interactive nil) (ajg-set-mono-font "14"))
(defun mono16-font () (interactive nil) (ajg-set-mono-font "16"))
(defun mono18-font () (interactive nil) (ajg-set-mono-font "18"))
(defun mono20-font () (interactive nil) (ajg-set-mono-font "20"))
(defun mono25-font () (interactive nil) (ajg-set-mono-font "25"))
(defun 4-up-font () (interactive nil) (mono12-font))
(defun 3-up-font () (interactive nil) (mono16-font))
(defun big-font () (interactive nil) (mono16-font))
(defun 2-up-font () (interactive nil) (mono25-font))
(defun huge-font () (interactive nil) (mono25-font))
(defun 1-up-font () (interactive nil) (mono52-font)) ; for a presentation
- defining default face, Rodrigo Canellas, 2008/09/08
- Re: defining default face,
Allan Gottlieb <=
- Message not available