From 5e5e80fb43b19caa1eb003a96c0a7cba00126983 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 12 Jan 2009 02:32:08 +0000 Subject: [PATCH] (Finternal_set_lisp_face_attribute): If setting the family, clear the font width index too. --- src/xfaces.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xfaces.c b/src/xfaces.c index 54c317a5ea7..141d565203f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3341,6 +3341,12 @@ FRAME 0 means change the face on all frames, and change the default 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 -- 2.39.2