From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ralf Jung Newsgroups: gmane.emacs.bugs Subject: bug#21028: Slow font rendering in emacs Date: Tue, 14 Mar 2017 20:17:00 +0100 Message-ID: <885ac0e4-b5ba-d435-5190-8cd3c46fb624@ralfj.de> References: <559F9FAF.8090708@live.com> <83zigpayz8.fsf@gnu.org> <83tw6wc3mz.fsf@gnu.org> <3c939f8c-8f78-12b8-3e07-242aa6dd12be@ralfj.de> <83a88nbx79.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1489519172 18265 195.159.176.226 (14 Mar 2017 19:19:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 19:19:32 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cc: 21028@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 14 20:19:27 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnryg-0003yH-7T for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 20:19:26 +0100 Original-Received: from localhost ([::1]:33131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnrym-0004E1-7X for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Mar 2017 15:19:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnrxQ-0003Fo-2k for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 15:18:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnrxK-0002tw-28 for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 15:18:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnrxJ-0002tp-Ug for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 15:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cnrxJ-0005Rs-Qp for bug-gnu-emacs@gnu.org; Tue, 14 Mar 2017 15:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ralf Jung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Mar 2017 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21028-submit@debbugs.gnu.org id=B21028.148951903120876 (code B ref 21028); Tue, 14 Mar 2017 19:18:01 +0000 Original-Received: (at 21028) by debbugs.gnu.org; 14 Mar 2017 19:17:11 +0000 Original-Received: from localhost ([127.0.0.1]:55984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnrwV-0005Qe-FD for submit@debbugs.gnu.org; Tue, 14 Mar 2017 15:17:11 -0400 Original-Received: from eins.ralfj.de ([85.214.220.216]:40957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnrwS-0005Lz-Mr for 21028@debbugs.gnu.org; Tue, 14 Mar 2017 15:17:09 -0400 Original-Received: from [192.168.1.110] (p54A58A74.dip0.t-ipconnect.de [84.165.138.116]) by mx.ralfj.de (Postfix) with ESMTPSA id 4AB3A17D000F; Tue, 14 Mar 2017 20:17:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ralfj.de; s=mail; t=1489519022; bh=AMxw3KmgP5QRAyd8EktpuVQz/XsVWniuoJzraW9Ktwg=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=TNJIjNQAgLu0b8Jsl1e3a6lpUoFZqKfF/ByLooMmWho2deEn052i+HtPVT6SNQSMf lFrKJD3DkumuEzEp9/M+RkIxPx5YIbO1MSSM8uBlldicBHrjZal9uOKdD62wzhK8xp +F6pHGe7STujinV2D6I+Ma7KAafI3bocnyABpUb0= In-Reply-To: <83a88nbx79.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130592 Archived-At: Hi again, > Note that the above is probably relevant to Emacs 25.1 and later (the > first item definitely), so I suggest to upgrade, because this stuff > should work much better in Emacs 25, and some of your problems might > just go away without any need for customization. All right, I am on emacs 25.1.1 in Debian testing now. If I just remove all font configuration, I still see emacs picking the wrong characters: While the Latin and Greek letters and the arrows are all Fira Sans Mono (my system-wide default monospace font), emacs still picks STIX to render ∃ and "DejaVu Math TeX Gyre" for ↦ and ∖. (Actually the situation with ∖ is even more weird -- once I *select* that character (i.e., I use shift+arrow key to mark it -- sorry, I don't know the emacs terminology here), it actually changes to some other font, which I can tell because it suddenly is only half the width. Unfortunately I don't know how to query that font because that would remove the selection, but it looks a lot like the one from Symbola.) So I want to tell emacs to use DejaVu for everything the default font doesn't support. I tried (set-fontset-font "fontset-default" 'unicode (font-spec :name "DejaVu Sans Mono" :size 11.0)) but that just results in *fewer* characters being rendered in Fira Sans. For example, Σ is now rendered in TeX Gyre Schola Math. (How can setting DejaVu as the 'unicode font result in emacs switching from Fira Sans to TeX Gyre?!?) For additional confusion, if I select the Σ, it switches to some other font; I can't tell which. This brings me back to (set-fontset-font "fontset-default" 'unicode (font-spec :name "Monospace" :size 11.0)) (set-fontset-font "fontset-default" 'unicode (font-spec :name "DejaVu Sans Mono" :size 11.0) nil 'append) which fixes Σ, but still leaves all the other characters with their wrong fonts. So I do (dolist (ft (fontset-list)) ; Main font (set-fontset-font ft 'unicode (font-spec :name "Monospace" :size 11.0)) ; Fallback font (set-fontset-font ft 'unicode (font-spec :name "DejaVu Sans Mono" :size 11.0) nil 'append) ) And now it uses the right font for things supported by either Fira or DejaVu. For ∖, it picks STIXVariants, which is slightly too high so the line grid is not perfect; that's why I usually try to make Symbola the fallback-fallback font. In any case, the above configuration is *slow*. As in, way slower than Emacs 24 was. Just clicking somewhere results in a noticeably delay of ~0.5s until the cursor actually moves. Same for C-v. C-n is still instantaneous. This is all at the top of . The way larger list.v file I mentioned earlier is less affected, i.e., it is still slow but not slower than Emacs 24. This may be related to the fact that rc.v uses much more unicode characters than list.v. Lucky enough, my work-around still works; I can keep my old "weird" configuration. Kind regards, Ralf