(realize_default_face): Check if the default font name
exists on this display before trying to use it.
This commit is contained in:
parent
d166ca6de5
commit
73158a393a
1 changed files with 12 additions and 4 deletions
16
src/xfaces.c
16
src/xfaces.c
|
@ -7071,10 +7071,18 @@ realize_default_face (f)
|
||||||
#ifdef HAVE_WINDOW_SYSTEM
|
#ifdef HAVE_WINDOW_SYSTEM
|
||||||
#ifdef HAVE_X_WINDOWS
|
#ifdef HAVE_X_WINDOWS
|
||||||
if (face->font != FRAME_FONT (f))
|
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
|
/* This can happen when making a frame on a display that does
|
||||||
are rejected), we must adjust the frame font. */
|
not support the default font. */
|
||||||
x_set_font (f, build_string (face->font_name), Qnil);
|
if (!face->font)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Otherwise, the font specified for the frame was not
|
||||||
|
acceptable as a font for the default face (perhaps because
|
||||||
|
auto-scaled fonts are rejected), so we must adjust the frame
|
||||||
|
font. */
|
||||||
|
x_set_font (f, build_string (face->font_name), Qnil);
|
||||||
|
}
|
||||||
#endif /* HAVE_X_WINDOWS */
|
#endif /* HAVE_X_WINDOWS */
|
||||||
#endif /* HAVE_WINDOW_SYSTEM */
|
#endif /* HAVE_WINDOW_SYSTEM */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue