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#65803: 29.1; Noto Sans Mono CJK JP has doubled-width on Windows Date: Sun, 10 Sep 2023 12:30:02 +0300 Message-ID: <83fs3ms7dx.fsf@gnu.org> References: <83jzt1xju6.fsf@gnu.org> <83wmx0x3hj.fsf@gnu.org> <87wmx0dbn6.fsf@yahoo.com> <834jk3v8ux.fsf@gnu.org> <87wmwzbh5z.fsf@yahoo.com> <83pm2rtmvz.fsf@gnu.org> <87o7iac05e.fsf@yahoo.com> <834jk2txe6.fsf@gnu.org> <87fs3mbnem.fsf@yahoo.com> <831qf6twid.fsf@gnu.org> <877coybmho.fsf@yahoo.com> <83y1heseud.fsf@gnu.org> <8734zmbi1z.fsf@yahoo.com> <83msxusbvb.fsf@gnu.org> <87tts2a2cz.fsf@yahoo.com> <83jzsysbh4.fsf@gnu.org> <87pm2qa1s7.fsf@yahoo.com> <83il8isan2.fsf@gnu.org> <87ledea0oy.fsf@yahoo.com> <83h6o2s97x.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23747"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com To: luangruo@yahoo.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 10 11:31:13 2023 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 1qfGme-0005xN-8T for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Sep 2023 11:31:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfGmU-00036q-Lv; Sun, 10 Sep 2023 05:31:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfGmR-00034C-Rk for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 05:31:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfGmR-0006zZ-JW for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 05:30:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfGmU-0006cl-Fw for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 05:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Sep 2023 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65803 X-GNU-PR-Package: emacs Original-Received: via spool by 65803-submit@debbugs.gnu.org id=B65803.169433823725431 (code B ref 65803); Sun, 10 Sep 2023 09:31:02 +0000 Original-Received: (at 65803) by debbugs.gnu.org; 10 Sep 2023 09:30:37 +0000 Original-Received: from localhost ([127.0.0.1]:49095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfGm4-0006c7-Gp for submit@debbugs.gnu.org; Sun, 10 Sep 2023 05:30:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfGlz-0006bq-NN for 65803@debbugs.gnu.org; Sun, 10 Sep 2023 05:30:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfGlq-0006lI-SW; Sun, 10 Sep 2023 05:30:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Z3rBhClunBYNsJFNukw8D5k5/DQHnxuZ5OmQP4hodjU=; b=OJ5/sS4nHgOj 1fjs+hOger6RgTqsP+zyM5AzDXPKMpJIQPm1jen++ALKlsyE8jFf489HuMdjimQtejUUmkNXKFGU5 iEWzs17mwT/JXD2LEvPoSov+dJcCtUqa6v40JUZk6EpkYQbPbxnbGPWvirbBTumdtHCl1J7WXbLr9 ewbpk2UmiUbnhpOgd2qAqSSo8VRpMgO0sN0GmKFvqCUTVc+HG3wEQ1A37x0Xa8d4VLGmAf9+UDJdC xL7Wyc5G0TUltHNCe2Y+OQbCOfW+U4UAav3C8O6RPYhyW4ixY4PZh40eYQ5So8AwreotSsAZHVBa6 EuZdlQusTlWoiBq96DP7uA==; In-Reply-To: <83h6o2s97x.fsf@gnu.org> (message from Eli Zaretskii on Sun, 10 Sep 2023 11:50:26 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269941 Archived-At: > Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com > Date: Sun, 10 Sep 2023 11:50:26 +0300 > From: Eli Zaretskii > > > From: Po Lu > > Cc: shingo.fg8@gmail.com, 65803@debbugs.gnu.org > > Date: Sun, 10 Sep 2023 16:31:57 +0800 > > > > Eli Zaretskii writes: > > > > > I don't see the fact of the font being fixed-pitch or proportional > > > mentioned in the output of describe-font. Am I missing something? > > > > Strange. Here, I see: > > > > full name: Source Code Pro:pixelsize=13:foundry=ADBO:weight=regular:slant=normal:width=normal:spacing=100:scalable=true > > > > where `spacing=100' indicates the font is monospace. > > That's specific to Fontconfig, I think. On Windows I see: > > full name: Courier New-10.0 Anyway, I tried to write the code to compute the font average width, and found that it's impossible to do reliably on MS-Windows: all the font-related functions that return glyph metrics require a "device context" argument, which cannot be provided as long as we don't have at least one w32 frame. So invocations like emacs -fn "Arial Unicode MS" will not work, and that means invoking Emacs with variable-pitch fonts as the default will not be able to take advantage of this improvement, which basically makes all this change useless. Maybe it's possible to pull this trick anyway, but it will take someone who knows the Windows GUI programming better than myself, perhaps by reading the font data directly (like the Windows port of Freetype does?). Sorry. I guess the conclusion is, unfortunately, that fonts like Noto Sans Mono CJK JP cannot be used on Windows as the default font, only as font for the CJK scripts (configured via the fontset).