diff options
| author | Chong Yidong | 2006-11-21 17:22:49 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-11-21 17:22:49 +0000 |
| commit | 73158a393abb74e3bc9efca7c50ba220f8720c91 (patch) | |
| tree | f1738758328ac9abbfae7641183e55246fb57db1 /src | |
| parent | d166ca6de5d41f5e9a57f5111a53bcb811064966 (diff) | |
| download | emacs-73158a393abb74e3bc9efca7c50ba220f8720c91.tar.gz emacs-73158a393abb74e3bc9efca7c50ba220f8720c91.zip | |
(realize_default_face): Check if the default font name
exists on this display before trying to use it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index bd08871f278..e93531e1f59 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -7071,10 +7071,18 @@ realize_default_face (f) | |||
| 7071 | #ifdef HAVE_WINDOW_SYSTEM | 7071 | #ifdef HAVE_WINDOW_SYSTEM |
| 7072 | #ifdef HAVE_X_WINDOWS | 7072 | #ifdef HAVE_X_WINDOWS |
| 7073 | if (face->font != FRAME_FONT (f)) | 7073 | if (face->font != FRAME_FONT (f)) |
| 7074 | /* As the font specified for the frame was not acceptable as a | 7074 | { |
| 7075 | font for the default face (perhaps because auto-scaled fonts | 7075 | /* This can happen when making a frame on a display that does |
| 7076 | are rejected), we must adjust the frame font. */ | 7076 | not support the default font. */ |
| 7077 | x_set_font (f, build_string (face->font_name), Qnil); | 7077 | if (!face->font) |
| 7078 | return 0; | ||
| 7079 | |||
| 7080 | /* Otherwise, the font specified for the frame was not | ||
| 7081 | acceptable as a font for the default face (perhaps because | ||
| 7082 | auto-scaled fonts are rejected), so we must adjust the frame | ||
| 7083 | font. */ | ||
| 7084 | x_set_font (f, build_string (face->font_name), Qnil); | ||
| 7085 | } | ||
| 7078 | #endif /* HAVE_X_WINDOWS */ | 7086 | #endif /* HAVE_X_WINDOWS */ |
| 7079 | #endif /* HAVE_WINDOW_SYSTEM */ | 7087 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 7080 | return 1; | 7088 | return 1; |