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: Fri, 08 Sep 2023 15:18:32 +0300 Message-ID: <83wmx0x3hj.fsf@gnu.org> References: <83bkeeytwf.fsf@gnu.org> <838r9iyrky.fsf@gnu.org> <835y4myqtb.fsf@gnu.org> <83jzt1xju6.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="21006"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65803@debbugs.gnu.org To: Shingo Tanaka , Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 08 14:19:23 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 1qeaSJ-0005Fm-Fn for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Sep 2023 14:19:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeaRy-0008WA-PB; Fri, 08 Sep 2023 08:19: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 1qeaRx-0008Vu-CY for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 08:19:01 -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 1qeaRw-0005ew-4u for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 08:19:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeaRx-0003AG-V0 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 08:19: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: Fri, 08 Sep 2023 12:19:01 +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.169417553312150 (code B ref 65803); Fri, 08 Sep 2023 12:19:01 +0000 Original-Received: (at 65803) by debbugs.gnu.org; 8 Sep 2023 12:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:42483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeaRo-00039u-Qi for submit@debbugs.gnu.org; Fri, 08 Sep 2023 08:18:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeaRl-00039g-KE for 65803@debbugs.gnu.org; Fri, 08 Sep 2023 08:18:50 -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 1qeaRd-0005dB-Pu; Fri, 08 Sep 2023 08:18:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=p2AhJiAJaqhrf2ww6M/771Yq1ccubmIYCmVH7bKHhHY=; b=TxzL/RFebGdpq59jc2iw V8DRbxVO7z0kV00NeXlX8qzsMvezySF34iEfRV4FXap9Cs6eKVOjPuQF7Cy7BTY7qORurYapCoXok MdxGvvzhtoyTpGIL7O97d/82xNdte+d1U1RGPnThchnMgKVsrBIqqzHq4Cfd3U6IVbT0V0enXuTAg X4UfLn1XLKW+aH8m2mv5pc0sEZ4i8Zada6UVRQJEeYHilWv3/QeoXSP0nm24BlhvLYBGzbKsGGC5y W45i1t0nc1KjX2BDMNg78FSvnCZcbf4UBM0iBhEXEwW2h8MS0+Tc5ZZps4zzW5yxfx6DY3Bs0d/JE P3BiFyB71CvBTw==; In-Reply-To: (message from Shingo Tanaka on Fri, 8 Sep 2023 07:26:18 +0900) 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:269765 Archived-At: > From: Shingo Tanaka > Date: Fri, 8 Sep 2023 07:26:18 +0900 > Cc: 65803@debbugs.gnu.org > > > Please also tell what does (frame-char-width) return with each of the > > two fonts on Windows. > > Here are the results including the one on Ubuntu. > Obviously, the 2nd one (Noto on Windows) returns a doubled-width size > which is unexpected. > > ;; On Windows - No issue > (progn > (set-face-attribute 'default nil :font "MS ゴシック") > (frame-char-width)) > 10 > (string-pixel-width "A") > 10 > (string-pixel-width "あ") > 20 > > ;; On Windows - Wrong frame-char-width > (progn > (set-face-attribute 'default nil :font "Noto Sans Mono CJK JP") > (frame-char-width)) > 20 > (string-pixel-width "A") > 10 > (string-pixel-width "あ") > 20 > > ;; On Ubuntu (w/Cairo) - No issue > (progn > (set-face-attribute 'default nil :font "Noto Sans Mono CJK JP") > (frame-char-width)) > 13 > (string-pixel-width "A") > 13 > (string-pixel-width "あ") > 26 This is strange. AFAIU, frame-char-width returns the "average width" attribute of the font, so why do we get different results on Windows and on X? Po Lu, can you help? Do font backends on X perform some trickery on the font's average_width attribute that we don't do on Windows? > > Is your Ubuntu build with Cairo, btw? > > Yes, the Emacs on Ubuntu is the latest Snap version which is compiled > with Cairo, as I can double check it by seeing colored Emoji.