From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#39286: 27.0.60; Wrong font for Cyrillic characters in emacs buffer Date: Sun, 07 Feb 2021 18:09:23 +0200 Message-ID: <83lfbzn9l8.fsf@gnu.org> References: <8336c2p2iw.fsf@gnu.org> <89E739F0-3085-43BC-81ED-883ACA91FB4C@gmail.com> <83v9osko0q.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39286@debbugs.gnu.org To: =?UTF-8?Q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 07 17:10:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8mdW-00011e-TP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 17:10:11 +0100 Original-Received: from localhost ([::1]:49814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8mdV-00065I-Q7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Feb 2021 11:10:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8mdO-00064j-OR for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 11:10:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8mdO-0004qK-HK for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 11:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8mdO-0006m3-Cl for bug-gnu-emacs@gnu.org; Sun, 07 Feb 2021 11:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Feb 2021 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39286 X-GNU-PR-Package: emacs Original-Received: via spool by 39286-submit@debbugs.gnu.org id=B39286.161271416325984 (code B ref 39286); Sun, 07 Feb 2021 16:10:02 +0000 Original-Received: (at 39286) by debbugs.gnu.org; 7 Feb 2021 16:09:23 +0000 Original-Received: from localhost ([127.0.0.1]:48544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8mcl-0006l2-0J for submit@debbugs.gnu.org; Sun, 07 Feb 2021 11:09:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8mci-0006ki-B1 for 39286@debbugs.gnu.org; Sun, 07 Feb 2021 11:09:22 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60513) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8mcd-0004Wt-6L; Sun, 07 Feb 2021 11:09:15 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2825 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8mcc-0004VU-8D; Sun, 07 Feb 2021 11:09:14 -0500 In-Reply-To: (message from =?UTF-8?Q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= on Fri, 31 Jan 2020 12:13:18 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199510 Archived-At: > Date: Fri, 31 Jan 2020 12:13:18 +0300 > From: Дмитрий > Cc: 39286@debbugs.gnu.org A year later, I bumped into a system where I saw something very similar, so I debugged this. > ((open "-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "harfbuzz:-outline-BatangChe-normal-normal-normal-mono-13-*-c-*-gb2312.1980-0") (sort-by > "-*-normal-normal-normal-*-13-*" > "harfbuzz:-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0") (list > "-outline-*-mono-*-gb2312.1980-0" ["-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GungsuhChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GulimChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-DotumChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-MingLiU-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Gothic-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Mincho-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-NSimSun-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-FangSong-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-SimHei-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-KaiTi-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GungsuhChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GulimChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-DotumChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-MingLiU-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Gothic-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Mincho-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-NSimSun-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-FangSong-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-SimHei-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-KaiTi-normal-normal-normal-mono-*-c-*-gb2312.1980-0"]) (w32font-list > "-outline-*-mono-*-gb2312.1980-0" ("-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GungsuhChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GulimChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-DotumChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-MingLiU-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Gothic-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Mincho-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-NSimSun-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-FangSong-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-SimHei-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-KaiTi-normal-normal-normal-mono-*-c-*-gb2312.1980-0")) (harfbuzz-list > "-outline-*-mono-*-gb2312.1980-0" ("-outline-BatangChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GungsuhChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-GulimChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-DotumChe-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-MingLiU-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Gothic-normal-normal-normal-mono-*-c-*-gb2312.1980-0" "-outline-MS > Mincho-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-NSimSun-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-FangSong-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-SimHei-normal-normal-normal-mono-*-c-*-gb2312.1980-0" > "-outline-KaiTi-normal-normal-normal-mono-*-c-*-gb2312.1980-0")) (list "-*-Courier New-*-gb2312.1980-0" > nil) (w32font-list "-*-Courier New-*-gb2312.1980-0" nil) (harfbuzz-list "-*-Courier New-*-gb2312.1980-0" nil) > (list "-*-Courier New-*-mono-*-gb2312.1980-0" nil) (w32font-list "-*-Courier New-*-mono-*-gb2312.1980-0" > nil) (harfbuzz-list "-*-Courier New-*-mono-*-gb2312.1980-0" nil) (list "-outline-Courier New-*-gb2312.1980-0" > nil) (w32font-list "-outline-Courier New-*-gb2312.1980-0" nil) (harfbuzz-list "-outline-Courier > New-*-gb2312.1980-0" nil) (list "-outline-Courier New-*-mono-*-gb2312.1980-0" nil) (w32font-list > "-outline-Courier New-*-mono-*-gb2312.1980-0" nil) (harfbuzz-list "-outline-Courier > New-*-mono-*-gb2312.1980-0" nil) (list "-*-iso8859-5" nil) (w32font-list "-*-iso8859-5" nil) (harfbuzz-list > "-*-iso8859-5" nil) (list "-*-mono-*-iso8859-5" nil) (w32font-list "-*-mono-*-iso8859-5" nil) (harfbuzz-list > "-*-mono-*-iso8859-5" nil) (list "-outline-*-iso8859-5" nil) (w32font-list "-outline-*-iso8859-5" nil) (harfbuzz-list > "-outline-*-iso8859-5" nil) (list "-outline-*-mono-*-iso8859-5" nil) (w32font-list "-outline-*-mono-*-iso8859-5" > nil) (harfbuzz-list "-outline-*-mono-*-iso8859-5" nil) (list "-*-Courier New-*-iso8859-5" nil) (w32font-list > "-*-Courier New-*-iso8859-5" nil) (harfbuzz-list "-*-Courier New-*-iso8859-5" nil) (list "-*-Courier > New-*-mono-*-iso8859-5" nil) (w32font-list "-*-Courier New-*-mono-*-iso8859-5" nil) (harfbuzz-list > "-*-Courier New-*-mono-*-iso8859-5" nil) (list "-outline-Courier New-*-iso8859-5" nil) (w32font-list > "-outline-Courier New-*-iso8859-5" nil) (harfbuzz-list "-outline-Courier New-*-iso8859-5" nil) (list > "-outline-Courier New-*-mono-*-iso8859-5" nil) (w32font-list "-outline-Courier New-*-mono-*-iso8859-5" nil) > (harfbuzz-list "-outline-Courier New-*-mono-*-iso8859-5" nil) (default\ fontset:\ font\ for 1092 nil)) Note that iso10646-1 charset never appears in the above log, although the setup for Cyrillic in the default fontset is this: (cyrillic ,(font-spec :registry "iso10646-1" :script 'cyrillic) (nil . "ISO8859-5") (nil . "microsoft-cp1251") (nil . "koi8-r")) IOW, iso10646-1 is the first registry value Emacs should have tried, but it is nowhere to be seen in the above log. The reason for this is that the fontset is reordered according to the locale's preferences, as recorded in Vcharset_ordered_list and Vcharset_non_preferred_head, and these are screwed up because Windows returns to us a bogus locale name "ZZZ". That causes the iso10646-1 part of the Cyrillic fontset to be pushed way down the preference order, and we begin by examining the other registry values. Even so, iso8859-5 should have saved the day, but there's another problem: we don't have information in w32-charset-info-alist for mapping iso-8859-5 into Windows charset constants. So I have now fixed both problems on the emacs-27 branch, and as result the Cyrillic characters are displayed using Courier New, as expected. Do you still have access to that system where you saw the problem? If so, can you build Emacs from the recent emacs-27 branch and see if the problem is solved? Even if you cannot build Emacs, I can tell you how to fix the problem manually. Thanks.