Mercurial > emacs
changeset 90562:9d76594a90f0
(x_set_font_backend): Do more works that were done in
font_update_drivers before.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 01 Aug 2006 01:22:48 +0000 |
parents | 73750c4e078a |
children | 7c29515f7c2a |
files | src/frame.c |
diffstat | 1 files changed, 24 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 */