From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64420: string-width of =?UTF-8?Q?=E2=80=A6?= is 2 in CJK environments Date: Sun, 13 Aug 2023 13:48:42 +0300 Message-ID: <81c993ab-eefd-26ee-df73-ef1e3a57740a@gutov.dev> References: <83jzuz93rh.fsf@gnu.org> <837cq9sfcc.fsf@gnu.org> <83wmy2gm5h.fsf@gnu.org> <4B239A5E-0878-4304-8C28-FEEC1EBC1B4E@gmail.com> <0db0f93a-bcbc-39d3-d92a-02fff66b4887@gutov.dev> <83sf8ncy62.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8481"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: itaemu@gmail.com, casouri@gmail.com, 64420@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 13 12:49: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 1qV8es-0001v0-Mr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Aug 2023 12:49:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV8ef-0007y9-Nh; Sun, 13 Aug 2023 06:49:05 -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 1qV8ec-0007xs-3G for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:49:03 -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 1qV8eb-0002ST-GB for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:49:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qV8eb-0007vT-6s for bug-gnu-emacs@gnu.org; Sun, 13 Aug 2023 06:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Aug 2023 10:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64420 X-GNU-PR-Package: emacs Original-Received: via spool by 64420-submit@debbugs.gnu.org id=B64420.169192373730300 (code B ref 64420); Sun, 13 Aug 2023 10:49:01 +0000 Original-Received: (at 64420) by debbugs.gnu.org; 13 Aug 2023 10:48:57 +0000 Original-Received: from localhost ([127.0.0.1]:58328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV8eW-0007sd-OB for submit@debbugs.gnu.org; Sun, 13 Aug 2023 06:48:57 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:38565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV8eR-0007rk-O7 for 64420@debbugs.gnu.org; Sun, 13 Aug 2023 06:48:55 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 781455C00D3; Sun, 13 Aug 2023 06:48:46 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 13 Aug 2023 06:48:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1691923726; x=1692010126; bh=nnhkAoVJL/R3FIHDLMGDIGT5v9r+5yPRYs0 D46hAsw0=; b=HsuvDShLYOyfpvEKj2lw/wYQY6zaYkr/fFfpkutQ/RY+VtDgRjD QaKdBvyI+RV1l3/2TCLj/f/6acqtU99IJa74hCOpX9Gi0pXuhp9fQoSLQ2ReghGV V21PdZrZCuMwS6C1WAQYPHhUwzAWSIGd/DpLjNKofcujJpPIv7fzrzL+AdGeERpi HPc2eWP+WKuXAeWd8mUhoidnaGbMDgbN/E5FEYp2ML1dCVAgCoUPh0dUQvvjc9H/ zA+h43rq2Oy+9VeUyY6f2qXD/JfA20qloDMJOk8rnhGeTQMjqXYsSStVOLpT8ihx hFRx/rlXc9ORz8S27bhx0bRYIiUFlnzdr9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1691923726; x=1692010126; bh=nnhkAoVJL/R3FIHDLMGDIGT5v9r+5yPRYs0 D46hAsw0=; b=ecNOe8fSL0lzbjB4YrhlJcexp8DyL8OCey4VxjwXC6w2IwaYTVE kl9FmsXs06MqqAkzHHT92DyseqoPPGzv+IlpfZA4D/b5QT/XiCeBisI5yj0LTAej WYUbfh2awQ3Ot3dCa5TkGWrsJ1uYoRANoJaZ9nhxa2lKoBL6lY7HlNKFYAZwNgPL oxTpCT5QzYXT9pQmivjT2CabE0IWvsFwgbo0zkJdhywHKyFLLaLP+7VrwawqmGD5 uMRgEKMHKBLhBISIM2kYMfI3/8shRBocKRDejbyRTdvoSjNva7DflOJ0KxmdLJMl yrBmq0bOn2uct79vKe3ZewTLebNchSUh65A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtvddgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Aug 2023 06:48:45 -0400 (EDT) Content-Language: en-US In-Reply-To: <83sf8ncy62.fsf@gnu.org> 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:267357 Archived-At: On 13/08/2023 08:24, Eli Zaretskii wrote: >> Date: Sun, 13 Aug 2023 03:22:41 +0300 >> Cc:itaemu@gmail.com,64420@debbugs.gnu.org >> From: Dmitry Gutov >> >> On 11/08/2023 21:07, Yuan Fu wrote: >>> On GUI display, the later-half of the ambiguous characters are definitely wider than one char, but they aren’t quite 2 chars wide either. But I guess it doesn’t matter too much since one should use pixel size on GUI anyway. >> BTW, I think most double-width characters on GUI are less than 2 >> characters wide? >> >> So the point here would be that some "ambiguous" ones are still wider >> than 1, I guess. > According to Yuan, at least in his environment those characters have a > width that is closer to 2 than to 1. In which case using 2 would > produce better alignment. Of course, using string-pixel-width will > produce an even better alignment. In GUI, that is. But if they are displayed with width 1 in terminal, we better make string-width return 1 for them too. That might be slightly worse for certain applications (like popup in company), but at least the basic rendering and navigation bugs in terminal will be fixed this way. And the new popup rendering for company (using string-width and spacing instructions) is close to being ready anyway.