aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.c
diff options
context:
space:
mode:
authorStefan Monnier2009-05-06 02:57:47 +0000
committerStefan Monnier2009-05-06 02:57:47 +0000
commitba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9 (patch)
tree879fa57bfb067c76970729d3377e0ec10a79f0bd /src/font.c
parent834cf4368cc72709be4b4d656a5a835924cd14ef (diff)
downloademacs-ba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9.tar.gz
emacs-ba98e3a0fffe915d4f3a94c1c3bf69f05cc812b9.zip
(font_update_drivers): Sanity fallback to avoid disabling all drivers.
Diffstat (limited to 'src/font.c')
-rw-r--r--src/font.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/font.c b/src/font.c
index 16ae9cdc0f4..cdff0d678e6 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3655,6 +3655,23 @@ font_update_drivers (f, new_drivers)
3655 next = &(*next)->next; 3655 next = &(*next)->next;
3656 } 3656 }
3657 *next = NULL; 3657 *next = NULL;
3658
3659 if (! f->font_driver_list->on)
3660 { /* None of the drivers is enabled: enable them all.
3661 Happens if you set the list of drivers to (xft x) in your .emacs
3662 and then use it under w32 or ns. */
3663 for (list = f->font_driver_list; list; list = list->next)
3664 {
3665 struct font_driver *driver = list->driver;
3666 eassert (! list->on);
3667 if (! driver->start_for_frame
3668 || driver->start_for_frame (f) == 0)
3669 {
3670 font_prepare_cache (f, driver);
3671 list->on = 1;
3672 }
3673 }
3674 }
3658 } 3675 }
3659 3676
3660 for (list = f->font_driver_list; list; list = list->next) 3677 for (list = f->font_driver_list; list; list = list->next)