Mercurial > emacs
changeset 101156:fe4728c4a48b
(font_clear_prop): If clearing the family, clear the font width index
too.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 13 Jan 2009 20:02:59 +0000 |
parents | 9e5f8e946d21 |
children | 09733f004f60 |
files | src/font.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/font.c Tue Jan 13 20:02:34 2009 +0000 +++ b/src/font.c Tue Jan 13 20:02:59 2009 +0000 @@ -3083,7 +3083,13 @@ if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_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_REGISTRY_INDEX, Qnil); ASET (font, FONT_SIZE_INDEX, Qnil);