From c95a34c96013aaba1cdf2166c4a1d0e2c5f3de6a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 30 Jul 2022 17:21:54 +0900 Subject: * src/macfont.m (macfont_open): Initialize font->space_width. (Bug#56808) --- src/macfont.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/macfont.m b/src/macfont.m index e3dab1c42e0..b30c3c9763c 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -2628,6 +2628,9 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size) font->pixel_size = size; font->driver = &macfont_driver; font->encoding_charset = font->repertory_charset = -1; + /* Clear font->space_width so macfont_monospace_width_multiplier may + not be confused by an uninitialized value. */ + font->space_width = 0; block_input (); -- cgit v1.2.3