aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2023-07-21 15:19:02 +0300
committerEli Zaretskii2023-07-21 15:19:02 +0300
commit845d6561ed07a8a979200a389a39db08dffccdc8 (patch)
tree1065ff3e94f00f1e898ee234a3dc679bb0c2d3db /src
parentc55e67081e9873a32b6e665e44f3e5a9c301255f (diff)
downloademacs-845d6561ed07a8a979200a389a39db08dffccdc8.tar.gz
emacs-845d6561ed07a8a979200a389a39db08dffccdc8.zip
Fix Proced display header alignment under 'text-scale-adjust'
* lisp/proced.el (proced-mode): Force the header-line to scale according to 'text-scale-adjust'. (proced-header-line): Use width of the header-line's face's characters as align-to units, not the width of the frame's default face's font. (Bug#64752) * src/xdisp.c (calc_pixel_width_or_height): Use font's average_width or space_width, not max_width, as the correct measure of the font's width. This is consistent with the rest of the display engine.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index da6e0afa8e1..2eba42e3d90 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -29093,7 +29093,9 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
29093 /* 'width': the width of FONT. */ 29093 /* 'width': the width of FONT. */
29094 if (EQ (prop, Qwidth)) 29094 if (EQ (prop, Qwidth))
29095 return OK_PIXELS (font 29095 return OK_PIXELS (font
29096 ? FONT_WIDTH (font) 29096 ? (font->average_width
29097 ? font->average_width
29098 : font->space_width)
29097 : FRAME_COLUMN_WIDTH (it->f)); 29099 : FRAME_COLUMN_WIDTH (it->f));
29098#else 29100#else
29099 if (EQ (prop, Qheight) || EQ (prop, Qwidth)) 29101 if (EQ (prop, Qheight) || EQ (prop, Qwidth))