From 4da9c1365a222952e8a22471b541fb34bd8edcdb Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 10 May 2006 12:38:58 +0000 Subject: [PATCH] (realize_default_face): If the font chosen for the default face was different from the frame font, adjust the frame font. --- src/ChangeLog | 6 ++++++ src/xfaces.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index dff5c16ef0e..afaa1c3af67 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-05-10 Kenichi Handa + + * xfaces.c (realize_default_face) [HAVE_X_WINDOWS]: If the font + chosen for the default face was different from the frame font, + adjust the frame font. + 2006-05-10 YAMAMOTO Mitsuharu * image.c (Qduration) [MAC_OS]: Undo previous change. diff --git a/src/xfaces.c b/src/xfaces.c index a0bb97f63f4..a5c5a21f585 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7072,6 +7072,16 @@ realize_default_face (f) check_lface (lface); bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); face = realize_face (c, attrs, 0, NULL, DEFAULT_FACE_ID); + +#ifdef HAVE_WINDOW_SYSTEM +#ifdef HAVE_X_WINDOWS + if (face->font != FRAME_FONT (f)) + /* As the font specified for the frame was not acceptable as a + font for the default face (perhaps because auto-scaled fonts + are rejected), we must adjust the frame font. */ + x_set_font (f, build_string (face->font_name), Qnil); +#endif /* HAVE_X_WINDOWS */ +#endif /* HAVE_WINDOW_SYSTEM */ return 1; } -- 2.39.5