# HG changeset patch # User Kenichi Handa # Date 1154395368 0 # Node ID 9d76594a90f0f3db2114b707ea08e0feb7ee6023 # Parent 73750c4e078a7c23c73727db39587f5d8b927071 (x_set_font_backend): Do more works that were done in font_update_drivers before. diff -r 73750c4e078a -r 9d76594a90f0 src/frame.c --- a/src/frame.c Tue Aug 01 01:21:08 2006 +0000 +++ b/src/frame.c Tue Aug 01 01:22:48 2006 +0000 @@ -3179,8 +3179,6 @@ struct frame *f; Lisp_Object new_value, old_value; { - Lisp_Object frame; - if (! NILP (new_value) && !CONSP (new_value)) { @@ -3199,9 +3197,32 @@ p1++; p0 = p1; } + new_value = Fnreverse (new_value); } - font_update_drivers (f, new_value, FRAME_FONT_OBJECT (f)); + if (! NILP (old_value) && ! NILP (Fequal (old_value, new_value))) + return; + + if (FRAME_FONT_OBJECT (f)) + { + free_all_realized_faces (Qnil); + Fclear_font_cache (); + } + + new_value = font_update_drivers (f, new_value); + if (NILP (new_value)) + error ("No font backend available"); + store_frame_param (f, Qfont_backend, new_value); + + if (FRAME_FONT_OBJECT (f)) + { + Lisp_Object frame; + + XSETFRAME (frame, f); + x_set_font (f, Fframe_parameter (frame, Qfont), Qnil); + ++face_change_count; + ++windows_or_buffers_changed; + } } #endif /* USE_FONT_BACKEND */