changeset 101135:bed84e5170a8

(Finternal_set_lisp_face_attribute): If setting the family, clear the font width index too.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 12 Jan 2009 02:32:08 +0000
parents d2b9a5feaf33
children ef524a34d985
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Mon Jan 12 02:31:52 2009 +0000
+++ b/src/xfaces.c	Mon Jan 12 02:32:08 2009 +0000
@@ -3341,6 +3341,12 @@
 	 the attribute is mandatory.  Also, clear the average
 	 width.  */
       font_clear_prop (XVECTOR (lface)->contents, prop_index);
+
+      /* If we are setting QCfamily, clear out FONT_WIDTH_INDEX as
+	 well.  This avoids rejecting valid families that lack support
+	 for a particular width.  */
+      if (prop_index == FONT_FAMILY_INDEX)
+	font_clear_prop (XVECTOR (lface)->contents, FONT_WIDTH_INDEX);
     }
 
   /* Changing a named face means that all realized faces depending on