aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-01-13 20:02:59 +0000
committerChong Yidong2009-01-13 20:02:59 +0000
commit962e8aa92adf4e309468b4940f52bad683424654 (patch)
treee0af70a27c3a88dfbf760e4b5aab5f596190f7a3 /src
parent4e99855e0fb254ff3195481d9daaff97b003ca41 (diff)
downloademacs-962e8aa92adf4e309468b4940f52bad683424654.tar.gz
emacs-962e8aa92adf4e309468b4940f52bad683424654.zip
(font_clear_prop): If clearing the family, clear the font width index
too.
Diffstat (limited to 'src')
-rw-r--r--src/font.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/font.c b/src/font.c
index 3cb48e3df7c..b7f4c42fc62 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3083,7 +3083,13 @@ font_clear_prop (attrs, prop)
3083 if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX) 3083 if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX)
3084 { 3084 {
3085 if (prop == FONT_FAMILY_INDEX) 3085 if (prop == FONT_FAMILY_INDEX)
3086 ASET (font, FONT_FOUNDRY_INDEX, Qnil); 3086 {
3087 ASET (font, FONT_FOUNDRY_INDEX, Qnil);
3088 /* If we are setting the font family, we must also clear
3089 FONT_WIDTH_INDEX to avoid rejecting families that lack
3090 support for some widths. */
3091 ASET (font, FONT_WIDTH_INDEX, Qnil);
3092 }
3087 ASET (font, FONT_ADSTYLE_INDEX, Qnil); 3093 ASET (font, FONT_ADSTYLE_INDEX, Qnil);
3088 ASET (font, FONT_REGISTRY_INDEX, Qnil); 3094 ASET (font, FONT_REGISTRY_INDEX, Qnil);
3089 ASET (font, FONT_SIZE_INDEX, Qnil); 3095 ASET (font, FONT_SIZE_INDEX, Qnil);