Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs: GUI with emacs --daemon not loading fonts correctly

Tags:

I set up an emacs --daemon in order to startup emacs faster. I like especially the GUI version of emacs, so I do emacsclient -c to open a new emacs frame.

The problem is that I have changed my fonts, but these fonts aren't loaded if I start emacsclient -c. However, they are applied if I start just emacs (but this causes the whole .emacs to be evaluated).

So: Is there a way of applying my font settings also if I start emacs with emacsclient -c?

like image 259
phimuemue Avatar asked Oct 21 '10 06:10

phimuemue


2 Answers

In short, you have to use default-frame-alist for that. Like this:

(setq default-frame-alist '((font . "Inconsolata-dz-15")))

This will be evaluated every time you start a new, graphical frame in Emacs. This is also where you save other frame-related settings, like settings for your fringe and such.

like image 71
monotux Avatar answered Oct 09 '22 20:10

monotux


The following will probably do what you are looking for.

(add-to-list 'default-frame-alist '(font . "Inconsolata-12"))
like image 42
sbellef Avatar answered Oct 09 '22 20:10

sbellef