changeset 36446:59630511a774

(x_set_font): Handle case of x_new_fontset returning the same name as before, although there was a change in fontsets.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 01 Mar 2001 12:56:26 +0000
parents 904a83f1b00b
children 924d76b7ad8e
files src/xfns.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfns.c	Wed Feb 28 17:43:49 2001 +0000
+++ b/src/xfns.c	Thu Mar 01 12:56:26 2001 +0000
@@ -1814,6 +1814,7 @@
   Lisp_Object result;
   Lisp_Object fontset_name;
   Lisp_Object frame;
+  int old_fontset = f->output_data.x->fontset;
 
   CHECK_STRING (arg, 1);
 
@@ -1831,8 +1832,16 @@
     error ("The characters of the given font have varying widths");
   else if (STRINGP (result))
     {
-      if (!NILP (Fequal (result, oldval)))
+      if (STRINGP (fontset_name))
+	{
+	  /* Fontset names are built from ASCII font names, so the
+	     names may be equal despite there was a change.  */
+	  if (old_fontset == f->output_data.x->fontset)
+	    return;
+	}
+      else if (!NILP (Fequal (result, oldval)))
 	return;
+      
       store_frame_param (f, Qfont, result);
       recompute_basic_faces (f);
     }