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: Sat, 09 Sep 2023 17:57:36 +0300 Message-ID: <83pm2rtmvz.fsf@gnu.org> References: <83bkeeytwf.fsf@gnu.org> <838r9iyrky.fsf@gnu.org> <835y4myqtb.fsf@gnu.org> <83jzt1xju6.fsf@gnu.org> <83wmx0x3hj.fsf@gnu.org> <87wmx0dbn6.fsf@yahoo.com> <834jk3v8ux.fsf@gnu.org> <87wmwzbh5z.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24673"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65803@debbugs.gnu.org, shingo.fg8@gmail.com To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 16:58:20 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 1qezPe-00065v-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 16:58:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qezPN-0001HX-UV; Sat, 09 Sep 2023 10:58:01 -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 1qezPM-0001HE-If for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 10:58: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 1qezPM-0001Aj-9G for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 10:58:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qezPO-0004Z7-6b for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 10:58: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: Sat, 09 Sep 2023 14:58: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.169427147417535 (code B ref 65803); Sat, 09 Sep 2023 14:58:02 +0000 Original-Received: (at 65803) by debbugs.gnu.org; 9 Sep 2023 14:57:54 +0000 Original-Received: from localhost ([127.0.0.1]:48249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qezPF-0004Yl-PL for submit@debbugs.gnu.org; Sat, 09 Sep 2023 10:57:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qezPD-0004YY-2H for 65803@debbugs.gnu.org; Sat, 09 Sep 2023 10:57:52 -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 1qezP4-00019i-Jo; Sat, 09 Sep 2023 10:57:42 -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=Uj9yQCSjYvb8m+VG/8fVb5iEzkOWYcggbbPoLC4ofiY=; b=QbL6lKKGEom7 caENc6G4EKOtcm88UbbILDQ8rtdLiO6xYxhNd2Y1bBwnna5ARPz4EErwE2e4e8FKRvHP4+gKD29N6 VGceFbOqpcDFkiH9D0plCMOW3TH9kIqmnl0XbZwZ9PcsMMJL2gFj1q1kVz4bnALTnDrMNfF8ZS9e5 OsrGIdUh0yEt78nRPjd2kcwLh/Pt97L+miWElA6wnF1LvN0k+XrXaznDdVqR1v5skiUAGoQSK0JDj oonf4m/ZB6C4jbrzdaS9YvPxtKA97AFQ6xZJHxw96tmVD+WqsOVZHzqAF1WPoTr/x8KV06Db+xtOZ gA3XG/nmwpQgwTE2/15h5w==; In-Reply-To: <87wmwzbh5z.fsf@yahoo.com> (message from Po Lu on Sat, 09 Sep 2023 21:38:32 +0800) 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:269871 Archived-At: > From: Po Lu > Cc: shingo.fg8@gmail.com, 65803@debbugs.gnu.org > Date: Sat, 09 Sep 2023 21:38:32 +0800 > > font->min_width = font->average_width = font->space_width > = (scalable ? ft_face->max_advance_width * size / upEM + 0.5 > : ft_face->size->metrics.max_advance >> 6); > > That aside, Fontconfig does not judge Noto Sans Mono CJK JP a fixed > pitch font on my system. Basically, calculating our own estimate of the average width means we discard the attribute reported by the font, in effect backing up on the change made in OpenType spec v3, which deprecated the previous requirement to compute the average width based only on ASCII characters. This seems to be justified only because Emacs uses the average width of the font for one purpose only: to calculate the default column width of a frame. So this calculation is only relevant for when a font is used as the default face's font. If we ever decide to use the average width for anything else, we might be bitten by this. So I think a cleaner solution would be to leave the average width attribute as the font reports it, and introduce a new attribute for the average width of the ASCII characters. Not sure how urgent this is, but we should at least describe this subtlety in the comments.