# HG changeset patch # User Chong Yidong # Date 1231876979 0 # Node ID fe4728c4a48b73a49fcd789b1821ea0312a9c0c4 # Parent 9e5f8e946d216795622f4db02b7cadc36d2d9888 (font_clear_prop): If clearing the family, clear the font width index too. diff -r 9e5f8e946d21 -r fe4728c4a48b src/font.c --- 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);