Commit 962e8aa9 authored by Chong Yidong's avatar Chong Yidong
Browse files

(font_clear_prop): If clearing the family, clear the font width index

too.
parent 4e99855e
...@@ -3083,7 +3083,13 @@ font_clear_prop (attrs, prop) ...@@ -3083,7 +3083,13 @@ font_clear_prop (attrs, prop)
if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX) if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX)
{ {
if (prop == FONT_FAMILY_INDEX) if (prop == FONT_FAMILY_INDEX)
ASET (font, FONT_FOUNDRY_INDEX, Qnil); {
ASET (font, FONT_FOUNDRY_INDEX, Qnil);
/* If we are setting the font family, we must also clear
FONT_WIDTH_INDEX to avoid rejecting families that lack
support for some widths. */
ASET (font, FONT_WIDTH_INDEX, Qnil);
}
ASET (font, FONT_ADSTYLE_INDEX, Qnil); ASET (font, FONT_ADSTYLE_INDEX, Qnil);
ASET (font, FONT_REGISTRY_INDEX, Qnil); ASET (font, FONT_REGISTRY_INDEX, Qnil);
ASET (font, FONT_SIZE_INDEX, Qnil); ASET (font, FONT_SIZE_INDEX, Qnil);
......
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