diff options
author | Kenichi Handa <handa@m17n.org> | 2005-03-08 08:45:48 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2005-03-08 08:45:48 +0000 |
commit | 8f2e6673597e952fc92191f21fe554a5f51242dc (patch) | |
tree | 04b1a65bcadc9f6d1c8e16d2e735a5173bd2efc5 /src/fontset.c | |
parent | 060855d54d2c3158f801d023569eafa5c63ce640 (diff) | |
download | emacs-8f2e6673597e952fc92191f21fe554a5f51242dc.tar.gz |
(set_default_ascii_font): New function.
(syms_of_fontset): Don't set FONTSET_ASCII (Vdefault_fontset)
here.
Diffstat (limited to 'src/fontset.c')
-rw-r--r-- | src/fontset.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/fontset.c b/src/fontset.c index f3bdc4c235e..c1de33fcf06 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -764,6 +764,23 @@ fs_load_font (f, c, fontname, id, face) #pragma optimize("", on) #endif +/* Set the ASCII font of the default fontset to FONTNAME if that is + not yet set. */ +void +set_default_ascii_font (fontname) + Lisp_Object fontname; +{ + if (! CONSP (FONTSET_ASCII (Vdefault_fontset))) + { + int id = fs_query_fontset (fontname, 2); + + if (id >= 0) + fontname = XCDR (FONTSET_ASCII (FONTSET_FROM_ID (id))); + FONTSET_ASCII (Vdefault_fontset) + = Fcons (make_number (0), fontname); + } +} + /* Cache data used by fontset_pattern_regexp. The car part is a pattern string containing at least one wild card, the cdr part is @@ -1627,19 +1644,6 @@ syms_of_fontset () FONTSET_ID (Vdefault_fontset) = make_number (0); FONTSET_NAME (Vdefault_fontset) = build_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"); -#if defined (MAC_OS) - FONTSET_ASCII (Vdefault_fontset) - = Fcons (make_number (0), - build_string ("-apple-monaco-medium-r-*--*-120-*-*-*-*-mac-roman")); -#elif defined (WINDOWSNT) - FONTSET_ASCII (Vdefault_fontset) - = Fcons (make_number (0), - build_string ("-*-courier new-normal-r-*-*-*-100-*-*-*-*-iso8859-1")); -#else - FONTSET_ASCII (Vdefault_fontset) - = Fcons (make_number (0), - build_string ("-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1")); -#endif AREF (Vfontset_table, 0) = Vdefault_fontset; next_fontset_id = 1; |