changeset 89353:f1507fc0d6e6

(x_new_fontset): Change the arg FONTSETNAME to Lisp string. Use new_fontset_from_font_name to create a fontset from a font name.
author Kenichi Handa <handa@m17n.org>
date Fri, 10 Jan 2003 07:22:03 +0000
parents ffa18ef18e45
children e5e735abeafc
files src/xterm.c
diffstat 1 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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;