unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* set default font for new frame
@ 2007-03-28 10:42 ssSslang
  2007-03-28 10:45 ` Herbert Euler
  0 siblings, 1 reply; 4+ messages in thread
From: ssSslang @ 2007-03-28 10:42 UTC (permalink / raw)
  To: help-gnu-emacs

Hi there, I wonder how to set the new frame's font. Now I had
(set-default-font "MyFontName") written in ~/.emacs. I can see the right
font when I start emacs. But the font changed after I called C-x 5 2 to
make a new frame. Could someone told me a solution? Thanks.
-- 
ssSslang

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: set default font for new frame
  2007-03-28 10:42 set default font for new frame ssSslang
@ 2007-03-28 10:45 ` Herbert Euler
  2007-03-28 11:41   ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Herbert Euler @ 2007-03-28 10:45 UTC (permalink / raw)
  To: sssslang, help-gnu-emacs

>Hi there, I wonder how to set the new frame's font. Now I had
>(set-default-font "MyFontName") written in ~/.emacs. I can see the right
>font when I start emacs. But the font changed after I called C-x 5 2 to
>make a new frame. Could someone told me a solution? Thanks.

You can try something like this:

(add-to-list 'default-frame-alist '(font . FONT-NAME))

Where FONT-NAME is the name of your prefered font.

Regards,
Guanpeng Xu

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set default font for new frame
  2007-03-28 10:45 ` Herbert Euler
@ 2007-03-28 11:41   ` Peter Dyballa
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2007-03-28 11:41 UTC (permalink / raw)
  To: Herbert Euler; +Cc: help-gnu-emacs


Am 28.03.2007 um 12:45 schrieb Herbert Euler:

> (add-to-list 'default-frame-alist '(font . FONT-NAME))

There is also an initial-frame-alist ...

--
Greetings

   Pete

UNIX is user friendly, it's just picky about who its friends are.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: set default font for new frame
       [not found] <mailman.1523.1175078672.7795.help-gnu-emacs@gnu.org>
@ 2007-03-29  2:21 ` B. T. Raven
  0 siblings, 0 replies; 4+ messages in thread
From: B. T. Raven @ 2007-03-29  2:21 UTC (permalink / raw)
  To: help-gnu-emacs

ssSslang wrote:
> Hi there, I wonder how to set the new frame's font. Now I had
> (set-default-font "MyFontName") written in ~/.emacs. I can see the right
> font when I start emacs. But the font changed after I called C-x 5 2 to
> make a new frame. Could someone told me a solution? Thanks.

At least under ver. 21.3 you can add window frame parameters to the 
make-frame function. I have this in my .emacs (for a second frame with a 
non-proportional font):

(make-frame '((name . "courier")
                (top . 1) (left . 1) (width . 98) (height . 17)
                (visibility . icon) ; nil or icon
                (font . "-outline-Courier 
New-normal-r-normal-normal-*-*-96-96-c-*-iso10646-1")))

(select-frame-by-name "courier")

;;Doesn't work in 22.0. Elisp manual (29.3.3 Window Frame Parameters) says 
somewhere that some optional arguments are semi-obsolete. Font is only 
mentioned under color parameters.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-29  2:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 10:42 set default font for new frame ssSslang
2007-03-28 10:45 ` Herbert Euler
2007-03-28 11:41   ` Peter Dyballa
     [not found] <mailman.1523.1175078672.7795.help-gnu-emacs@gnu.org>
2007-03-29  2:21 ` B. T. Raven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).