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: Thu, 19 Jul 2018 16:41:52 +0300 Message-ID: <83fu0f2vhb.fsf@gnu.org> References: <83muut9q8m.fsf@gnu.org> <45c210aa-5a57-45f7-9bd4-752876b233c2@default> <8336wj9s5d.fsf@gnu.org> <83y3ea7ff4.fsf@gnu.org> <83tvox7vi7.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 1532009527 31624 195.159.176.226 (19 Jul 2018 14:12:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2018 14:12:07 +0000 (UTC) Cc: 32159@debbugs.gnu.org To: moses.mason@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 19 16:12:03 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 1fg9f0-00084D-M7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jul 2018 16:12:02 +0200 Original-Received: from localhost ([::1]:43288 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fg9h6-00089r-4M for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jul 2018 10:14:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fg9D2-0006Ml-02 for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2018 09:43:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fg9Cw-00089U-7b for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2018 09:43:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fg9Cw-00088i-3l for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2018 09:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fg9Cv-00050W-RS for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2018 09:43: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: Thu, 19 Jul 2018 13:43: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.153200772719179 (code B ref 32159); Thu, 19 Jul 2018 13:43:01 +0000 Original-Received: (at 32159) by debbugs.gnu.org; 19 Jul 2018 13:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:47666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fg9C2-0004zH-Uv for submit@debbugs.gnu.org; Thu, 19 Jul 2018 09:42:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fg9C0-0004ym-Dk for 32159@debbugs.gnu.org; Thu, 19 Jul 2018 09:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fg9Br-0007PP-V5 for 32159@debbugs.gnu.org; Thu, 19 Jul 2018 09:41:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fg9Br-0007PL-Pi; Thu, 19 Jul 2018 09:41:55 -0400 Original-Received: from [176.228.60.248] (port=2033 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fg9Bo-00042t-Sd; Thu, 19 Jul 2018 09:41:54 -0400 In-reply-to: <83tvox7vi7.fsf@gnu.org> (message from Eli Zaretskii on Tue, 17 Jul 2018 18:05:36 +0300) 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:148672 Archived-At: > Date: Tue, 17 Jul 2018 18:05:36 +0300 > From: Eli Zaretskii > Cc: 32159@debbugs.gnu.org > > > 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. I've dug a little, and it looks like Firefox simply hard-codes an explicit font name or a short list of explicit font names for every "language" (what we call "script"). The defaults change whenever Firefox developers decide that a better font is available on the particular OS OOTB, or when a new version of the OS adds fonts. To see the defaults, type "about:config" into the address bar, and look at the font.name-list.* variables. The user can customize this (via Options, hidden under "Fonts & Colors -> Advanced") by specifying a single font for each script+style combination (where "style" is one of Serif, Sans-Serif, and Monospaced). Chrome seems to do something very similar, except that its defaults are less sophisticated (many scripts don't have fonts defined and use the global default font). The advantage of this method is that it avoids font search in the cases where by default there's only one font per script (slightly less than 50% of the scripts in my version of Firefox), and makes the search shorter when there are several candidate scripts in the list. The disadvantages are: . When the user installs a font that doesn't come with the OS OOTB, the only way to start using that font is to customize the defaults via Options. Likewise, when a non-standard font is uninstalled that was previously customized to be used by Firefox. . The defaults explicitly name fonts installed on the OS, so for non-free systems, such as Windows, and maybe also for free systems, they name non-free fonts. That is something we try very hard to avoid in our defaults, AFAIU. Emacs defaults usually do not specify fonts explicitly (with a few exceptions), but instead specify features that a font must have in order to be considered for characters belonging to a script. This allows the user significant more flexibility, since which font will be used is determined by the installed fonts, and does not require customization after installed fonts change. But the price is a potentially longer search for a font, especially when a lot of fonts are available on the system. We could do something similar to what the browsers do, if we want, at least on Free systems, but Someoneā„¢ would have to do the footwork of looking at enough boxes and collecting free fonts that are available OOTB there. This could at least be an optional feature, for those who don't intend changing their installed fonts too much, or not at all. For non-free systems, the corresponding settings could be perhaps on the wiki (and again, Someoneā„¢ should do the research and publish the results).