summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-10-14 04:08:08 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-10-14 04:08:08 +0000
commite69a00b7497cbd826071e453f7ada164cecc98da (patch)
tree62c39a15691286b315c46e95881ead116dd3ebbf /src/xfaces.c
parent40c89b5f65acb37d1d292482d66f7af2308d93dc (diff)
downloademacs-e69a00b7497cbd826071e453f7ada164cecc98da.tar.gz
(Finternal_set_lisp_face_attribute): If the font is to be updated,
clear its average width field too.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index aa3041d6910..196abe11dd7 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3356,12 +3356,16 @@ FRAME 0 means change the face on all frames, and change the default
signal_error ("Invalid face attribute name", attr);
if (prop_index)
- /* If a font-related attribute other than QCfont and QCfontset is
- specified, and if the original QCfont attribute has a font
- (font-spec or font-object), set the corresponding property in
- the font to nil so that the font selector doesn't think that
- the attribute is mandatory. */
- font_clear_prop (XVECTOR (lface)->contents, prop_index);
+ {
+ /* If a font-related attribute other than QCfont and QCfontset
+ is specified, and if the original QCfont attribute has a font
+ (font-spec or font-object), set the corresponding property in
+ the font to nil so that the font selector doesn't think that
+ the attribute is mandatory. Also, clear the average
+ width. */
+ font_clear_prop (XVECTOR (lface)->contents, prop_index);
+ font_clear_prop (XVECTOR (lface)->contents, FONT_AVGWIDTH_INDEX);
+ }
/* Changing a named face means that all realized faces depending on
that face are invalid. Since we cannot tell which realized faces