/* Cancel hourglass cursor on frame F. */
void (*hide_hourglass) (struct frame *f);
+ /* Called to (re)calculate the default face when changing the font
+ backend. */
+ void (*default_font_parameter) (struct frame *f, Lisp_Object parms);
#endif /* HAVE_WINDOW_SYSTEM */
};
return;
if (FRAME_FONT (f))
- free_all_realized_faces (Qnil);
+ {
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
+ free_all_realized_faces (frame);
+ }
new_value = font_update_drivers (f, NILP (new_value) ? Qt : new_value);
if (NILP (new_value))
if (FRAME_FONT (f))
{
- Lisp_Object frame;
-
- XSETFRAME (frame, f);
- gui_set_font (f, Fframe_parameter (frame, Qfont), Qnil);
+ /* Reconsider default font after backend(s) change (Bug#23386). */
+ FRAME_RIF(f)->default_font_parameter (f, Qnil);
face_change = true;
windows_or_buffers_changed = 18;
}
reset_mouse_highlight (&dpyinfo->mouse_highlight);
}
+/* This currently does nothing, since it's only really needed when
+ changing the font-backend, but macOS currently only has one
+ possible backend. This may change if we add HarfBuzz support. */
+static void
+ns_default_font_parameter (struct frame *f, Lisp_Object parms)
+{
+}
/* This and next define (many of the) public functions in this file. */
/* gui_* are generic versions in xdisp.c that we, and other terms, get away
ns_draw_window_divider,
ns_shift_glyphs_for_insert,
ns_show_hourglass,
- ns_hide_hourglass
+ ns_hide_hourglass,
+ ns_default_font_parameter
};
unwind_create_frame (frame);
}
-static void
+void
w32_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
w32_draw_window_divider,
w32_shift_glyphs_for_insert,
w32_show_hourglass,
- w32_hide_hourglass
+ w32_hide_hourglass,
+ w32_default_font_parameter
};
static void w32_delete_terminal (struct terminal *term);
extern const char *w32_get_string_resource (void *v_rdb,
const char *name,
const char *class);
+
+/* w32fns.c */
+extern void w32_default_font_parameter (struct frame* f, Lisp_Object parms);
+
\f
#define PIX_TYPE COLORREF
unwind_create_frame (frame);
}
-static void
+void
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
x_draw_window_divider,
x_shift_glyphs_for_insert, /* Never called; see comment in function. */
x_show_hourglass,
- x_hide_hourglass
+ x_hide_hourglass,
+ x_default_font_parameter
};
int *xptr,
int *yptr,
int *outer_border);
+extern void x_default_font_parameter (struct frame* f, Lisp_Object parms);
/* From xrdb.c. */