changeset 90412:6dcadac04bea

Include "font.h". (make_frame, x_set_font) [USE_FONT_BACKEND]: Use font-backend mechanism.
author Kenichi Handa <handa@m17n.org>
date Tue, 06 Jun 2006 03:52:09 +0000
parents 508480e70e4a
children 4ee003f8531c
files src/frame.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Tue Jun 06 03:51:57 2006 +0000
+++ b/src/frame.c	Tue Jun 06 03:52:09 2006 +0000
@@ -53,6 +53,10 @@
 
 #ifdef HAVE_WINDOW_SYSTEM
 
+#ifdef USE_FONT_BACKEND
+#include "font.h"
+#endif	/* USE_FONT_BACKEND */
+
 /* The name we're using in resource queries.  Most often "emacs".  */
 
 Lisp_Object Vx_resource_name;
@@ -299,6 +303,9 @@
 #endif
   f->size_hint_flags = 0;
   f->win_gravity = 0;
+#ifdef USE_FONT_BACKEND
+  f->font_driver_list = NULL;
+#endif	/* USE_FONT_BACKEND */
 
   root_window = make_window ();
   if (mini_p)
@@ -3068,6 +3075,12 @@
   Lisp_Object frame;
   int old_fontset = FRAME_FONTSET(f);
 
+#ifdef USE_FONT_BACKEND
+  if (enable_font_backend)
+    fontset_name = result = x_new_fontset2 (f, arg);
+  else
+    {
+#endif	/* USE_FONT_BACKEND */
   CHECK_STRING (arg);
 
   fontset_name = Fquery_fontset (arg, Qnil);
@@ -3077,6 +3090,9 @@
             ? x_new_fontset (f, fontset_name)
             : x_new_fontset (f, arg));
   UNBLOCK_INPUT;
+#ifdef USE_FONT_BACKEND
+    }
+#endif
 
   if (EQ (result, Qnil))
     error ("Font `%s' is not defined", SDATA (arg));