diff options
| author | Kenichi Handa | 2006-05-10 12:38:58 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-05-10 12:38:58 +0000 |
| commit | 4da9c1365a222952e8a22471b541fb34bd8edcdb (patch) | |
| tree | 43176f1fb4308839fadf856c18f64a81eaa2927a /src/xfaces.c | |
| parent | dec940492f8c813ef14b8f53be8953d808cd6c78 (diff) | |
| download | emacs-4da9c1365a222952e8a22471b541fb34bd8edcdb.tar.gz emacs-4da9c1365a222952e8a22471b541fb34bd8edcdb.zip | |
(realize_default_face): If the font chosen for the
default face was different from the frame font, adjust the frame
font.
Diffstat (limited to 'src/xfaces.c')
| -rw-r--r-- | src/xfaces.c | 10 |
1 files changed, 10 insertions, 0 deletions
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) | |||
| 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 | ||