Subject: Re: bug#18869: 25.0.50; Font-related problems when starting with --daemon

From: Dmitry Antipov <[email-masked]>
Date: Wed, 29 Oct 2014 17:46:09 +0300

On 10/28/2014 01:34 PM, Peder O. Klingenberg wrote:

> I have recently switched my default font, and through experimentation,
> found that I liked what I saw when I eval'ed (set-face-attribute
> 'default nil :font "Monospace-11") in a running emacs.  So I added that
> to my init file.  Starting emacs normally works fine.
>
> However, emacs --daemon now fails to start up.

Please try this.

Dmitry

=== modified file 'src/xfaces.c'
--- src/xfaces.c	2014-10-12 22:56:45 +0000
+++ src/xfaces.c	2014-10-29 14:42:46 +0000
@@ -3116,9 +3116,10 @@
               /* FIXME:
                  If frame is t, and selected frame is a tty frame, the font
                  can't be realized.  An improvement would be to loop over frames
-                 for a non-tty frame and use that.  See discussion in
-                 bug#18573.  */
-              if (f->terminal->type != output_termcap)
+                 for a non-tty frame and use that.  See discussion in Bug#18573.
+		 For a daemon, frame may be an initial frame (Bug#18869).  */
+              if (f->terminal->type != output_termcap
+		  && f->terminal->type != output_initial)
                 {
                   if (! FONT_OBJECT_P (value))
                     {