From: Eli Zaretskii <eliz@gnu.org>
To: Gennady Uraltsev <gennady.uraltsev@gmail.com>
Cc: 26402@debbugs.gnu.org
Subject: bug#26402: 25.2; Font rendering extremely slow on any non-default font
Date: Sat, 08 Apr 2017 20:18:15 +0300 [thread overview]
Message-ID: <83bms6n7hk.fsf@gnu.org> (raw)
In-Reply-To: <541302bf-540b-aedb-4ca4-2ba3acfe495e@gmail.com> (message from Gennady Uraltsev on Sat, 8 Apr 2017 18:32:34 +0200)
[Please keep the bug address on the CC list.]
> From: Gennady Uraltsev <gennady.uraltsev@gmail.com>
> Date: Sat, 8 Apr 2017 18:32:34 +0200
>
> The default font that emacs -Q starts with is
>
> xft:-adobe-Source Code
> Pro-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x2C)
>
> (I guess it comes from the fact that that is my predefined qt and gtk
> monospace font)
>
> once zooming in (text-scale-adjust INC) I get
>
> xft:-adobe-Source Code
> Pro-normal-normal-normal-*-18-*-*-*-m-0-iso10646-1 (#x1E)
>
> If instead of zooming in I do M-x buffer-face-set variable-pitch
> I get the font
>
> xft:-unknown-Roboto-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1 (#x48)
>
>
>
> I can also replicate this by setting the global font to be something
> else like
>
> xft:-unknown-Droid Sans-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1
> (#x54)
> xft:-monotype-Noto Sans-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1
> (#x36)
>
> at the level of the frame by using
>
> M-x set-frame-font
> -unknown-Droid Sans-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1
> or
> -monotype-Noto Sans-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1
>
> respectively. This does not have a negative impact on performance. But
> as soon as I enable something like
>
> M-x buffer-face-set fixed-pitch or
> (text-scale-adjust INC) the problem returns
Can you build your own Emacs? If so, could you please apply the
following patch and see if it solves the problem?
diff --git a/src/font.c b/src/font.c
index a929509..bb6d18b 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2777,21 +2777,22 @@ font_list_entities (struct frame *f, Lisp_Object spec)
val = XCDR (val);
else
{
- val = driver_list->driver->list (f, scratch_font_spec);
- if (!NILP (val))
- {
- Lisp_Object copy = copy_font_spec (scratch_font_spec);
+ Lisp_Object copy;
- val = Fvconcat (1, &val);
- ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type);
- XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache)));
- }
+ val = driver_list->driver->list (f, scratch_font_spec);
+ if (NILP (val))
+ val = zero_vector;
+ else
+ val = Fvconcat (1, &val);
+ copy = copy_font_spec (scratch_font_spec);
+ ASET (copy, FONT_TYPE_INDEX, driver_list->driver->type);
+ XSETCDR (cache, Fcons (Fcons (copy, val), XCDR (cache)));
}
- if (VECTORP (val) && ASIZE (val) > 0
+ if (ASIZE (val) > 0
&& (need_filtering
|| ! NILP (Vface_ignored_fonts)))
val = font_delete_unmatched (val, need_filtering ? spec : Qnil, size);
- if (VECTORP (val) && ASIZE (val) > 0)
+ if (ASIZE (val) > 0)
list = Fcons (val, list);
}
next prev parent reply other threads:[~2017-04-08 17:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-08 13:48 bug#26402: 25.2; Font rendering extremely slow on any non-default font Gennady Uraltsev
2017-04-08 14:44 ` Eli Zaretskii
2017-04-08 14:54 ` Gennady Uraltsev
2017-04-08 16:10 ` Eli Zaretskii
[not found] ` <541302bf-540b-aedb-4ca4-2ba3acfe495e@gmail.com>
2017-04-08 17:18 ` Eli Zaretskii [this message]
2017-04-08 22:33 ` Gennady Uraltsev
2017-04-09 5:44 ` Eli Zaretskii
2017-04-09 9:45 ` Eli Zaretskii
2017-04-09 11:07 ` Gennady Uraltsev
2017-04-09 11:59 ` Eli Zaretskii
2019-11-17 7:47 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83bms6n7hk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=26402@debbugs.gnu.org \
--cc=gennady.uraltsev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).