diff options
| author | Richard M. Stallman | 1993-07-24 07:23:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-07-24 07:23:16 +0000 |
| commit | e5e548e338cae173b7a994390a5af5822ee23e6b (patch) | |
| tree | bba639f8fa661af3c206d4e6ef6f9fb969906c10 /src | |
| parent | 82411f65a3b71b89f9357eadf882b86f4687b843 (diff) | |
| download | emacs-e5e548e338cae173b7a994390a5af5822ee23e6b.tar.gz emacs-e5e548e338cae173b7a994390a5af5822ee23e6b.zip | |
(Fx_create_frame): Don't look for default font
if the caller has specified a valid font. Try several
alternative font patterns.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfns.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/xfns.c b/src/xfns.c index 43dbabbc80e..ade94e129be 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1753,13 +1753,27 @@ be shared by the new frame.") | |||
| 1753 | { | 1753 | { |
| 1754 | Lisp_Object font; | 1754 | Lisp_Object font; |
| 1755 | 1755 | ||
| 1756 | /* Try out a font which we know has bold and italic variations. */ | 1756 | font = x_get_arg (parms, Qfont, "font", "Font", string); |
| 1757 | BLOCK_INPUT; | 1757 | BLOCK_INPUT; |
| 1758 | font = x_new_font (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); | 1758 | /* First, try whatever font the caller has specified. */ |
| 1759 | if (STRINGP (font)) | ||
| 1760 | font = x_new_font (f, XSTRING (tem)->data); | ||
| 1761 | /* Try out a font which we hope has bold and italic variations. */ | ||
| 1762 | if (!STRINGP (font)) | ||
| 1763 | font = x_new_font (f, "-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-1"); | ||
| 1764 | if (! STRINGP (font)) | ||
| 1765 | font = x_new_font (f, "-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-1"); | ||
| 1766 | if (! STRINGP (font)) | ||
| 1767 | /* This was formerly the first thing tried, but it finds too many fonts | ||
| 1768 | and takes too long. */ | ||
| 1769 | font = x_new_font (f, "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1"); | ||
| 1770 | /* If those didn't work, look for something which will at least work. */ | ||
| 1771 | if (! STRINGP (font)) | ||
| 1772 | font = x_new_font (f, "-*-fixed-*-*-*-*-*-120-*-*-c-*-iso8859-1"); | ||
| 1759 | UNBLOCK_INPUT; | 1773 | UNBLOCK_INPUT; |
| 1760 | if (! STRINGP (font)) | 1774 | if (! STRINGP (font)) |
| 1761 | font = build_string ("-*-fixed-*-*-*-*-*-120-*-*-c-*-iso8859-1"); | 1775 | font = build_string ("fixed"); |
| 1762 | 1776 | ||
| 1763 | x_default_parameter (f, parms, Qfont, font, | 1777 | x_default_parameter (f, parms, Qfont, font, |
| 1764 | "font", "Font", string); | 1778 | "font", "Font", string); |
| 1765 | } | 1779 | } |