comparison src/xfaces.c @ 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 d153d2fdd948
children 434948c350d2 b6689e223e2f 146cd8369025
comparison
equal deleted inserted replaced
70565:422d3b8bf63e 70566:a0f76f946025
7070 /* Realize the face; it must be fully-specified now. */ 7070 /* Realize the face; it must be fully-specified now. */
7071 xassert (lface_fully_specified_p (XVECTOR (lface)->contents)); 7071 xassert (lface_fully_specified_p (XVECTOR (lface)->contents));
7072 check_lface (lface); 7072 check_lface (lface);
7073 bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs); 7073 bcopy (XVECTOR (lface)->contents, attrs, sizeof attrs);
7074 face = realize_face (c, attrs, 0, NULL, DEFAULT_FACE_ID); 7074 face = realize_face (c, attrs, 0, NULL, DEFAULT_FACE_ID);
7075
7076 #ifdef HAVE_WINDOW_SYSTEM
7077 #ifdef HAVE_X_WINDOWS
7078 if (face->font != FRAME_FONT (f))
7079 /* As the font specified for the frame was not acceptable as a
7080 font for the default face (perhaps because auto-scaled fonts
7081 are rejected), we must adjust the frame font. */
7082 x_set_font (f, build_string (face->font_name), Qnil);
7083 #endif /* HAVE_X_WINDOWS */
7084 #endif /* HAVE_WINDOW_SYSTEM */
7075 return 1; 7085 return 1;
7076 } 7086 }
7077 7087
7078 7088
7079 /* Realize basic faces other than the default face in face cache C. 7089 /* Realize basic faces other than the default face in face cache C.