1988 |
|
|
1989 |
BLOCK_INPUT; |
BLOCK_INPUT; |
1990 |
result = (STRINGP (fontset_name) |
result = (STRINGP (fontset_name) |
1991 |
? x_new_fontset (f, XSTRING (fontset_name)->data) |
? x_new_fontset (f, fontset_name) |
1992 |
: x_new_fontset (f, XSTRING (arg)->data)); |
: x_new_fontset (f, arg)); |
1993 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
1994 |
|
|
1995 |
if (EQ (result, Qnil)) |
if (EQ (result, Qnil)) |
4424 |
{ |
{ |
4425 |
Lisp_Object font; |
Lisp_Object font; |
4426 |
|
|
4427 |
font = x_get_arg (dpyinfo, parms, Qfont, "font", "Font", RES_TYPE_STRING); |
font = x_get_arg (dpyinfo, parms, Qfont, |
4428 |
|
"font", "Font", RES_TYPE_STRING); |
4429 |
|
|
4430 |
BLOCK_INPUT; |
/* If the caller has specified no font, try out fonts which we |
4431 |
/* First, try whatever font the caller has specified. */ |
hope have bold and italic variations. */ |
|
if (STRINGP (font)) |
|
|
font = x_new_fontset (f, XSTRING (font)->data); |
|
|
|
|
|
/* Try out a font which we hope has bold and italic variations. */ |
|
|
if (!STRINGP (font)) |
|
|
font = x_new_fontset (f, "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1"); |
|
4432 |
if (!STRINGP (font)) |
if (!STRINGP (font)) |
4433 |
font = x_new_fontset (f, "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1"); |
{ |
4434 |
if (! STRINGP (font)) |
char *names[] |
4435 |
font = x_new_fontset (f, "-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1"); |
= { "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1", |
4436 |
if (! STRINGP (font)) |
"-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1", |
4437 |
/* This was formerly the first thing tried, but it finds too many fonts |
"-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1", |
4438 |
and takes too long. */ |
/* This was formerly the first thing tried, but it finds |
4439 |
font = x_new_fontset (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); |
too many fonts and takes too long. */ |
4440 |
/* If those didn't work, look for something which will at least work. */ |
"-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1", |
4441 |
if (! STRINGP (font)) |
/* If those didn't work, look for something which will |
4442 |
font = x_new_fontset (f, "-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1"); |
at least work. */ |
4443 |
UNBLOCK_INPUT; |
"-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1", |
4444 |
if (! STRINGP (font)) |
NULL }; |
4445 |
font = build_string ("fixed"); |
int i; |
4446 |
|
|
4447 |
|
BLOCK_INPUT; |
4448 |
|
for (i = 0; names[i]; i++) |
4449 |
|
{ |
4450 |
|
Lisp_Object list; |
4451 |
|
|
4452 |
|
list = x_list_fonts (f, build_string (names[i]), 0, 1); |
4453 |
|
if (CONSP (list)) |
4454 |
|
{ |
4455 |
|
font = XCAR (list); |
4456 |
|
break; |
4457 |
|
} |
4458 |
|
} |
4459 |
|
UNBLOCK_INPUT; |
4460 |
|
if (! STRINGP (font)) |
4461 |
|
font = build_string ("fixed"); |
4462 |
|
} |
4463 |
x_default_parameter (f, parms, Qfont, font, |
x_default_parameter (f, parms, Qfont, font, |
4464 |
"font", "Font", RES_TYPE_STRING); |
"font", "Font", RES_TYPE_STRING); |
4465 |
} |
} |
11030 |
{ |
{ |
11031 |
tem = Fquery_fontset (font, Qnil); |
tem = Fquery_fontset (font, Qnil); |
11032 |
if (STRINGP (tem)) |
if (STRINGP (tem)) |
11033 |
font = x_new_fontset (f, XSTRING (tem)->data); |
font = x_new_fontset (f, tem); |
11034 |
else |
else |
11035 |
font = x_new_font (f, XSTRING (font)->data); |
font = x_new_fontset (f, font); |
11036 |
} |
} |
11037 |
|
|
11038 |
/* Try out a font which we hope has bold and italic variations. */ |
/* Try out a font which we hope has bold and italic variations. */ |