Mercurial > emacs
comparison src/font.c @ 98717:507c5c477e60
(font_clear_prop): When clearing font width, clear the average width
field too.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 14 Oct 2008 14:41:20 +0000 |
parents | 29b77fe23d01 |
children | 741755a52dcf |
comparison
equal
deleted
inserted
replaced
98716:3e598e2ce8a6 | 98717:507c5c477e60 |
---|---|
2994 Lisp_Object font = attrs[LFACE_FONT_INDEX]; | 2994 Lisp_Object font = attrs[LFACE_FONT_INDEX]; |
2995 | 2995 |
2996 if (! FONTP (font)) | 2996 if (! FONTP (font)) |
2997 return; | 2997 return; |
2998 if (NILP (AREF (font, prop)) | 2998 if (NILP (AREF (font, prop)) |
2999 && prop != FONT_FAMILY_INDEX && prop != FONT_FOUNDRY_INDEX | 2999 && prop != FONT_FAMILY_INDEX |
3000 && prop != FONT_FOUNDRY_INDEX | |
3001 && prop != FONT_WIDTH_INDEX | |
3000 && prop != FONT_SIZE_INDEX) | 3002 && prop != FONT_SIZE_INDEX) |
3001 return; | 3003 return; |
3002 font = Fcopy_font_spec (font); | 3004 font = Fcopy_font_spec (font); |
3003 ASET (font, prop, Qnil); | 3005 ASET (font, prop, Qnil); |
3004 if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX) | 3006 if (prop == FONT_FAMILY_INDEX || prop == FONT_FOUNDRY_INDEX) |
3016 { | 3018 { |
3017 ASET (font, FONT_DPI_INDEX, Qnil); | 3019 ASET (font, FONT_DPI_INDEX, Qnil); |
3018 ASET (font, FONT_SPACING_INDEX, Qnil); | 3020 ASET (font, FONT_SPACING_INDEX, Qnil); |
3019 ASET (font, FONT_AVGWIDTH_INDEX, Qnil); | 3021 ASET (font, FONT_AVGWIDTH_INDEX, Qnil); |
3020 } | 3022 } |
3023 else if (prop == FONT_WIDTH_INDEX) | |
3024 ASET (font, FONT_AVGWIDTH_INDEX, Qnil); | |
3021 attrs[LFACE_FONT_INDEX] = font; | 3025 attrs[LFACE_FONT_INDEX] = font; |
3022 } | 3026 } |
3023 | 3027 |
3024 void | 3028 void |
3025 font_update_lface (f, attrs) | 3029 font_update_lface (f, attrs) |