emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xterm.c,v


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c,v
Date: Sun, 17 Feb 2008 02:02:54 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   08/02/17 02:02:54

Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.975
retrieving revision 1.976
diff -u -b -r1.975 -r1.976
--- xterm.c     10 Feb 2008 21:56:37 -0000      1.975
+++ xterm.c     17 Feb 2008 02:02:54 -0000      1.976
@@ -1098,6 +1098,11 @@
        }
 
       IF_DEBUG (x_check_font (s->f, s->font));
+#ifdef USE_FONT_BACKEND
+      if (enable_font_backend)
+       xgcv.font = FRAME_X_DISPLAY_INFO (s->f)->font->fid;
+      else
+#endif
       xgcv.font = s->font->fid;
       xgcv.graphics_exposures = False;
       mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
@@ -1154,6 +1159,11 @@
       xgcv.background = s->face->background;
       xgcv.foreground = s->face->foreground;
       IF_DEBUG (x_check_font (s->f, s->font));
+#ifdef USE_FONT_BACKEND
+      if (enable_font_backend)
+       xgcv.font = FRAME_X_DISPLAY_INFO (s->f)->font->fid;
+      else
+#endif
       xgcv.font = s->font->fid;
       xgcv.graphics_exposures = False;
       mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
@@ -8276,12 +8286,17 @@
   /* Now make the frame display the given font.  */
   if (FRAME_X_WINDOW (f) != 0)
     {
-      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc,
-               FRAME_FONT (f)->fid);
-      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->reverse_gc,
-               FRAME_FONT (f)->fid);
-      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc,
-               FRAME_FONT (f)->fid);
+      Font fid;
+
+#ifdef USE_FONT_BACKEND
+      if (enable_font_backend)
+       fid = FRAME_X_DISPLAY_INFO (f)->font->fid;
+      else
+#endif
+      fid = FRAME_FONT (f)->fid;
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc, fid);
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->reverse_gc, fid);
+      XSetFont (FRAME_X_DISPLAY (f), f->output_data.x->cursor_gc, fid);
 
       /* Don't change the size of a tip frame; there's no point in
         doing it because it's done in Fx_show_tip, and it leads to
@@ -11358,6 +11373,13 @@
   dpyinfo->font_table = NULL;
   dpyinfo->n_fonts = 0;
   dpyinfo->font_table_size = 0;
+#ifdef USE_FONT_BACKEND
+  dpyinfo->font = XLoadQueryFont (dpyinfo->display, "fixed");
+  if (! dpyinfo->font)
+    dpyinfo->font = XLoadQueryFont (dpyinfo->display, "*");
+  if (! dpyinfo->font)
+    abort ();
+#endif /* USE_FONT_BACKEND */
   dpyinfo->bitmaps = 0;
   dpyinfo->bitmaps_size = 0;
   dpyinfo->bitmaps_last = 0;
@@ -11813,7 +11835,9 @@
 
   BLOCK_INPUT;
 #ifdef USE_FONT_BACKEND
-  if (! enable_font_backend)
+  if (enable_font_backend)
+    XFreeFont (dpyinfo->display, dpyinfo->font);
+  else
 #endif
   /* Free the fonts in the font table.  */
   for (i = 0; i < dpyinfo->n_fonts; i++)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]