summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2020-03-16 17:21:02 +0100
committerRobert Pluim <rpluim@gmail.com>2020-03-17 16:58:09 +0100
commit5747a59a886e16fadbd04c385c43628b1d8f50df (patch)
tree0bc7cffa4d127fa213af9b13d7c050cc2c8e7b1b /src/xfns.c
parenta2dd8c4234c9a858e273ea22129962cee58fa4ce (diff)
downloademacs-5747a59a886e16fadbd04c385c43628b1d8f50df.tar.gz
Recalculate default font when switching font backend
This is an updated version of the patch by Dmitry Antipov <dmantipov@yandex.ru> in <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23386#43>. Fixes Bug#23386 * src/dispextern.h (struct redisplay_interface): New member default_font_parameter. * src/xterm.h: Add prototype for x_default_font_parameter. * src/xterm.c (x_redisplay_interface): Initialize default_font_parameter member. * src/xfns.c (x_default_font_parameter): Make non-static. * src/w32term.h: Add prototype for w32_default_font_parameter * src/w32fns.c (w32_default_font_parameter): Make non-static. * src/w32term.c (w32_redisplay_interface): Initialize default_font_parameter member. * src/nsterm.m (ns_redisplay_interface): Add dummy ns_default_font_parameter (there is currently only one possible font backend on macOS). Initialize default_font_parameter member. * src/frame.c (gui_set_font_backend): Recalculate default font using RIF default_font_parameter to avoid crash when changing font backend.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 276ea1c3935..afe1ceef81a 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3555,7 +3555,7 @@ do_unwind_create_frame (Lisp_Object frame)
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);