aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS6
-rw-r--r--src/alloc.c6
-rw-r--r--src/font.c13
3 files changed, 24 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 8c27289d5e0..3e686f98db3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -38,6 +38,12 @@ fontsets if the default font supports these characters. Set this
38variable to nil to disable the new behavior and get back the old 38variable to nil to disable the new behavior and get back the old
39behavior. 39behavior.
40 40
41---
42** New variable 'inhibit-compacting-font-caches'.
43Set this variable to a non-nil value to speed up display of characters
44using large fonts, at the price of a larger memory footprint of the
45Emacs session.
46
41 47
42* Installation Changes in Emacs 25.1 48* Installation Changes in Emacs 25.1
43 49
diff --git a/src/alloc.c b/src/alloc.c
index f33d93f83b4..c7f58a8adc4 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5584,7 +5584,11 @@ compact_font_caches (void)
5584 for (t = terminal_list; t; t = t->next_terminal) 5584 for (t = terminal_list; t; t = t->next_terminal)
5585 { 5585 {
5586 Lisp_Object cache = TERMINAL_FONT_CACHE (t); 5586 Lisp_Object cache = TERMINAL_FONT_CACHE (t);
5587 if (CONSP (cache)) 5587 /* Inhibit compacting the caches if the user so wishes. Some of
5588 the users don't mind a larger memory footprint, but do mind
5589 slower redisplay. */
5590 if (!inhibit_compacting_font_caches
5591 && CONSP (cache))
5588 { 5592 {
5589 Lisp_Object entry; 5593 Lisp_Object entry;
5590 5594
diff --git a/src/font.c b/src/font.c
index 2519599bc63..b85956f225c 100644
--- a/src/font.c
+++ b/src/font.c
@@ -5430,6 +5430,19 @@ Set it to nil to enable logging. If the environment variable
5430EMACS_FONT_LOG is set at startup, it defaults to nil. */); 5430EMACS_FONT_LOG is set at startup, it defaults to nil. */);
5431 Vfont_log = Qnil; 5431 Vfont_log = Qnil;
5432 5432
5433 DEFVAR_BOOL ("inhibit-compacting-font-caches", inhibit_compacting_font_caches,
5434 doc: /*
5435If non-nil, don't compact font caches during GC.
5436Some large fonts cause lots of consing and trigger GC. If they
5437are removed from the font caches, they will need to be opened
5438again during redisplay, which slows down redisplay. If you
5439see font-related delays in displaying some special characters,
5440and cannot switch to a smaller font for those characters, set
5441this variable non-nil.
5442Disabling compaction of font caches might enlarge the Emacs memory
5443footprint in sessions that use lots of different fonts. */);
5444 inhibit_compacting_font_caches = 0;
5445
5433#ifdef HAVE_WINDOW_SYSTEM 5446#ifdef HAVE_WINDOW_SYSTEM
5434#ifdef HAVE_FREETYPE 5447#ifdef HAVE_FREETYPE
5435 syms_of_ftfont (); 5448 syms_of_ftfont ();