]> git.eshelyaron.com Git - emacs.git/commitdiff
(font_update_drivers): Sanity fallback to avoid disabling all drivers.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 6 May 2009 02:57:47 +0000 (02:57 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 6 May 2009 02:57:47 +0000 (02:57 +0000)
src/ChangeLog
src/font.c

index b3f5bb483facfc8b11cd6b2af47285469e6f2d11..5f41bd894f41cfce03e2fbb4df1be88c7647857d 100644 (file)
@@ -1,5 +1,8 @@
 2009-05-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * font.c (font_update_drivers): Sanity fallback to avoid disabling
+       all drivers.
+
        * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep.
 
 2009-05-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
index 16ae9cdc0f42b815a456f49aca56b5bba38cd48d..cdff0d678e6027d14867c74238164f97f6dcc216 100644 (file)
@@ -3655,6 +3655,23 @@ font_update_drivers (f, new_drivers)
          next = &(*next)->next;
        }
       *next = NULL;
+
+      if (! f->font_driver_list->on)
+       { /* None of the drivers is enabled: enable them all.
+            Happens if you set the list of drivers to (xft x) in your .emacs
+            and then use it under w32 or ns.  */
+         for (list = f->font_driver_list; list; list = list->next)
+           {
+             struct font_driver *driver = list->driver;
+             eassert (! list->on);
+             if (! driver->start_for_frame
+                 || driver->start_for_frame (f) == 0)
+               {
+                 font_prepare_cache (f, driver);
+                 list->on = 1;
+               }
+           }
+       }
     }
 
   for (list = f->font_driver_list; list; list = list->next)