Mercurial > emacs
changeset 70566:a0f76f946025
(realize_default_face): If the font chosen for the
default face was different from the frame font, adjust the frame
font.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 10 May 2006 12:36:37 +0000 |
parents | 422d3b8bf63e |
children | cfb118f88417 |
files | src/xfaces.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xfaces.c Wed May 10 08:25:29 2006 +0000 +++ b/src/xfaces.c Wed May 10 12:36:37 2006 +0000 @@ -7072,6 +7072,16 @@ 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; }