From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32159: 26.1; inhibit-compacting-font-caches does not fix all fonts lagging issue Date: Tue, 17 Jul 2018 18:05:36 +0300 Message-ID: <83tvox7vi7.fsf@gnu.org> References: <83muut9q8m.fsf@gnu.org> <45c210aa-5a57-45f7-9bd4-752876b233c2@default> <8336wj9s5d.fsf@gnu.org> <83y3ea7ff4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531839855 26373 195.159.176.226 (17 Jul 2018 15:04:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2018 15:04:15 +0000 (UTC) Cc: 32159@debbugs.gnu.org To: Moses Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 17:04:11 2018 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 1ffRWM-0006jT-Ak for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2018 17:04:10 +0200 Original-Received: from localhost ([::1]:59857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffRYT-0004XF-C8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2018 11:06:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffRYI-0004W9-05 for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2018 11:06:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffRYA-0006LR-3N for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2018 11:06:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffRY9-0006L7-Tm for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2018 11:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ffRY9-00072J-MD for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2018 11:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jul 2018 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32159 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32159-submit@debbugs.gnu.org id=B32159.153183993827017 (code B ref 32159); Tue, 17 Jul 2018 15:06:01 +0000 Original-Received: (at 32159) by debbugs.gnu.org; 17 Jul 2018 15:05:38 +0000 Original-Received: from localhost ([127.0.0.1]:45621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffRXm-00071g-3T for submit@debbugs.gnu.org; Tue, 17 Jul 2018 11:05:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ffRXk-00071S-At for 32159@debbugs.gnu.org; Tue, 17 Jul 2018 11:05:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffRXa-0005tW-TR for 32159@debbugs.gnu.org; Tue, 17 Jul 2018 11:05:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffRXa-0005sL-JL; Tue, 17 Jul 2018 11:05:26 -0400 Original-Received: from [176.228.60.248] (port=3041 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ffRXa-0001d5-2w; Tue, 17 Jul 2018 11:05:26 -0400 In-reply-to: (message from Moses on Tue, 17 Jul 2018 12:22:27 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:148610 Archived-At: > From: Moses > Date: Tue, 17 Jul 2018 12:22:27 +0800 > Cc: drew.adams@oracle.com, 32159@debbugs.gnu.org > > > > and also the "iso10646-1" (encoding name?)? > > Always use iso10646-1, it makes no sense to use anything else with > > these scripts. > > How could a user know that? This should at least put into the manual. You can just drop the encoding, i.e. use (set-fontset-font "fontset-default" 'gujarati "Shruti") The encoding part is just a precaution, and is nowadays only important for some, hopefully rare, CJK use cases. I used it in my example for completeness' sake. > > > I do not find it in C-u C-x = and the manual is not very clear about > > > that. Anyway, why Emacs can not generate a "suggestion" of > > > set-fontset-font in the first place and tell user to add it into > > > .emacs? > > It does, in a way: look at the output of "C-u C-x =". Besides, how is > > Emacs to know that what happens on your system now is a permanent > > setup? > > It needn't be a permanent setup. Sorry, I'm not following: what you put on your ~/.emacs _is_ permanent setup, in the sense that it will be in effect as long as you don't change it. It won't react to changes in the fonts you install, for one thing. If, for example, you are just trying some font, and didn't yet decide whether you like it or not, suggesting that font for your fontset customization will just confuse if not worse. > If Emacs loading time becomes longer > (for example, > 5 sec.), it should prompt users to change their > fontset and give suggestion settings again. First, the 5 sec figure is hard to decide on, because it depends on many factors, like user impatience, the CPU speed, etc. More importantly, if Emacs stops short of finding a font, it will not have any useful suggestion for the actual setup of the fontset, because it will not know what font to suggest. But I think we are getting ahead of ourselves. There could be a place for user-level customization commands based on set-fontset-font (although I envision non-trivial UI issues, due to the power and flexibility of fontsets), but before we discuss that, we should establish that customizing fontsets indeed fixes your real-life problems. That doing so for some fonts makes HELLO display faster doesn't yet mean your real-life use cases are solved by doing the same. So please see if the problems that prompted your bug report are indeed solved by customizing your fontset, including determining which scripts/ranges of character codepoints needed such customization, and let's defer the discussion of more user-friendly facilities to after that. > BTW, I still confused why Emacs needs to scan fonts to determine which > character belongs to which font. Not "belongs", but "can be displayed by". And I don't think I understand your confusion: how else can any program determine which font supports a given character, except by checking the candidate fonts? > On the other hand, browsers like Firefox, Chromium could display > every script fonts very fast without issue. I don't know how the browsers look for fonts. If someone does, maybe they can describe that, and we might then be able to learn something useful. Just for the record: I didn't write the code in Emacs that implements font search, and have no real experience or expertise in that area, I just know one or two things (literally) about what our code does.