From e234927a7eac7232d837574ba30aa20bbc539f29 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 14 Oct 2008 14:41:20 +0000 Subject: [PATCH] (font_clear_prop): When clearing font width, clear the average width field too. --- src/font.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/font.c b/src/font.c index f299435e84e..a9ddd8353a5 100644 --- a/src/font.c +++ b/src/font.c @@ -2996,7 +2996,9 @@ font_clear_prop (attrs, prop) if (! FONTP (font)) return; if (NILP (AREF (font, prop)) - && prop != FONT_FAMILY_INDEX && prop != FONT_FOUNDRY_INDEX + && prop != FONT_FAMILY_INDEX + && prop != FONT_FOUNDRY_INDEX + && prop != FONT_WIDTH_INDEX && prop != FONT_SIZE_INDEX) return; font = Fcopy_font_spec (font); @@ -3018,6 +3020,8 @@ font_clear_prop (attrs, prop) ASET (font, FONT_SPACING_INDEX, Qnil); ASET (font, FONT_AVGWIDTH_INDEX, Qnil); } + else if (prop == FONT_WIDTH_INDEX) + ASET (font, FONT_AVGWIDTH_INDEX, Qnil); attrs[LFACE_FONT_INDEX] = font; } -- 2.39.5