# HG changeset patch # User Kenichi Handa # Date 1042183323 0 # Node ID f1507fc0d6e63377bb3958f555f3b4ec11baf81a # Parent ffa18ef18e45eb7326674c1e462c8231f393c4b6 (x_new_fontset): Change the arg FONTSETNAME to Lisp string. Use new_fontset_from_font_name to create a fontset from a font name. diff -r ffa18ef18e45 -r f1507fc0d6e6 src/xterm.c --- a/src/xterm.c Fri Jan 10 07:20:25 2003 +0000 +++ b/src/xterm.c Fri Jan 10 07:22:03 2003 +0000 @@ -12321,9 +12321,9 @@ Lisp_Object x_new_fontset (f, fontsetname) struct frame *f; - char *fontsetname; -{ - int fontset = fs_query_fontset (build_string (fontsetname), 0); + Lisp_Object fontsetname; +{ + int fontset = fs_query_fontset (fontsetname, 0); Lisp_Object result; if (fontset > 0 && f->output_data.x->fontset == fontset) @@ -12337,24 +12337,15 @@ if (fontset >= 0) result = x_new_font (f, (XSTRING (fontset_ascii (fontset))->data)); else - result = x_new_font (f, fontsetname); + result = x_new_font (f, XSTRING (fontsetname)->data); if (!STRINGP (result)) /* Can't load ASCII font. */ return Qnil; + fontset = fs_query_fontset (result, 0); if (fontset < 0) - { - Lisp_Object func; - - func = intern ("create-fontset-from-ascii-font"); - if (! NILP (Ffboundp (func))) - result = call2 (func, result, result); - else - Fnew_fontset (result, - Fcons (Fcons (Qascii, Fcons (result, Qnil)), Qnil)); - fontset = fs_query_fontset (result, 0); - } + fontset = new_fontset_from_font_name (result); /* Since x_new_font doesn't update any fontset information, do it now. */ f->output_data.x->fontset = fontset;