Commit e234927a authored by Chong Yidong's avatar Chong Yidong
Browse files

(font_clear_prop): When clearing font width, clear the average width

field too.
parent 050a81e9
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment