Subject: bug#57555: 29.0.50; variable-pitch font issue with medium weight default font

From: Gregory Heytings <[email-masked]>
Date: Mon, 05 Sep 2022 21:17:22 +0000

Amin, can you try the following patch, and tell us if it fixes your 
problem?

diff --git a/src/xfaces.c b/src/xfaces.c
index 5e3a47d7f8..08f37cf0b2 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6058,7 +6058,7 @@ realize_gui_face (struct face_cache *cache, 
Lisp_Object attrs[LFACE_VECTOR_SIZE]
         }
        if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
         attrs[LFACE_FONT_INDEX]
-         = font_load_for_lface (f, attrs, attrs[LFACE_FONT_INDEX]);
+         = font_load_for_lface (f, attrs, Ffont_spec (0, NULL));
        if (FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
         {
           face->font = XFONT_OBJECT (attrs[LFACE_FONT_INDEX]);