]> code.delx.au - gnu-emacs/blobdiff - src/xfaces.c
Merge from emacs-24
[gnu-emacs] / src / xfaces.c
index 73704bbba8eb1f0b2aa4606842b48204e2e0a97e..6afa0a2953d9bc39790c922965b700fe2f71c59b 100644 (file)
@@ -3112,17 +3112,26 @@ FRAME 0 means change the face on all frames, and change the default
                f = XFRAME (selected_frame);
              else
                f = XFRAME (frame);
-             if (! FONT_OBJECT_P (value))
-               {
-                 Lisp_Object *attrs = XVECTOR (lface)->contents;
-                 Lisp_Object font_object;
 
-                 font_object = font_load_for_lface (f, attrs, value);
-                 if (NILP (font_object))
-                   signal_error ("Font not available", value);
-                 value = font_object;
-               }
-             set_lface_from_font (f, lface, value, 1);
+              /* 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)
+                {
+                  if (! FONT_OBJECT_P (value))
+                    {
+                      Lisp_Object *attrs = XVECTOR (lface)->contents;
+                      Lisp_Object font_object;
+
+                      font_object = font_load_for_lface (f, attrs, value);
+                      if (NILP (font_object))
+                        signal_error ("Font not available", value);
+                      value = font_object;
+                    }
+                  set_lface_from_font (f, lface, value, 1);
+                }
            }
          else
            ASET (lface, LFACE_FONT_INDEX, value);