From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Feng Shu" Newsgroups: gmane.emacs.devel Subject: Re: Variable pitch text filling Date: Fri, 03 Dec 2021 19:55:51 +0800 Message-ID: <87lf119a2g.fsf@163.com> References: <87ilwft1ph.fsf@gnus.org> <87sfvessx6.fsf@gnus.org> <87wnkp9c3t.fsf@gnus.org> <87ee6wanra.fsf@gnus.org> <83r1awse4k.fsf@gnu.org> <87sfvc8kdw.fsf@gnus.org> <83czmgs7t1.fsf@gnu.org> <87k0go8ios.fsf@gnus.org> <83bl20s2dp.fsf@gnu.org> <87wnkojmny.fsf@gnus.org> <837dcos1oy.fsf@gnu.org> <87o860jm27.fsf@gnus.org> <831r2ws0jf.fsf@gnu.org> <87fsrcjkik.fsf@gnus.org> <83ee6uao67.fsf@gnu.org> <83sfva92vo.fsf@gnu.org> <83czme85xk.fsf@gnu.org> <878rx29k5n.fsf@163.com> <83a6hh9b75.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23726"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: casouri@gmail.com, larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 03 12:59:22 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mt7Dl-0005xE-6j for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 12:59:21 +0100 Original-Received: from localhost ([::1]:37270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt7Dj-0006qK-MV for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 06:59:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt7Ae-0002qi-DO for emacs-devel@gnu.org; Fri, 03 Dec 2021 06:56:08 -0500 Original-Received: from m12-18.163.com ([220.181.12.18]:58055) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt7AU-0001To-5l; Fri, 03 Dec 2021 06:56:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=RN5sh MYLAJM7K3gBpwfzj8fxNvydiEuuU9Zix7BPidA=; b=EHQqJgaS39MvU9/9bqtBx OOy5pY7Wptr24GPJW3MKDxVAk/zkhE8PhCBGmsz4erIYApL6ZK71cvhP3JQEEmzq FuVXm+995+37hOdSMtF+UMK7kd4+yJEkdVUICYT3ZykjyjdtbnhHHjY5sS9cMe+m /5quLicO/HsVpLMaxeuh9o= Original-Received: from debian (unknown [218.92.14.78]) by smtp14 (Coremail) with SMTP id EsCowAA3LQrIBaphwDOdAA--.6044S2; Fri, 03 Dec 2021 19:55:52 +0800 (CST) In-Reply-To: <83a6hh9b75.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Dec 2021 13:31:26 +0200") X-CM-TRANSID: EsCowAA3LQrIBaphwDOdAA--.6044S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7CrWkAF15Jw4fAFyrtw17trb_yoW8AFyUpa y5K3ZYkan5JFs5Kr1xXr40qF9ayrWrXr4DG3WrC34FyF95Xrn7Gr4Iga1Y9ryDAw4xuFyj qrWrtr93CFyUAaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UYFAJUUUUU= X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiEQhe1F7+5sgPOQAAsr Received-SPF: pass client-ip=220.181.12.18; envelope-from=tumashu@163.com; helo=m12-18.163.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280827 Archived-At: Eli Zaretskii writes: >> From: "Feng Shu" >> Cc: casouri@gmail.com, larsi@gnus.org, emacs-devel@gnu.org >> Date: Fri, 03 Dec 2021 16:17:56 +0800 >> >> > I'm very sorry. This cannot work. The problem is that we can easily >> > change the pixel-width of the character glyphs Emacs uses for its >> > layout calculations (which is what the change did), but when we >> > actually draw the glyphs on the glass, we ask the font backend to draw >> > a series of glyphs in one go, and the font backend uses the original >> > glyph metrics as reported by the font. So, unless we draw each glyph >> > separately (which is what moving the cursor through text causes us to >> > do), something that will slow down redisplay, we cannot add spacing to >> > characters that way. >> > >> > This is one of the "TIL" situations each one of us has with Emacs from >> > time to time. It means my thinking about adding character spacing was >> > based on wrong assumptions, and the only way to do that is to add >> > stretch glyphs (which can be done only between words). >> > >> > I reverted the changeset installed yesterday. >> >> this is really a bad news :-( > > What I can propose instead, as a kind-of "second best", is a similar > feature that will only affect whitespace characters (SPC and TAB): > when the proposed feature is turned on, those whitespace characters > will always end at X coordinate that is an integral multiple of the > "standard" column width. This way, a word within a text that mixes > ASCII and non-ASCII characters will always start on an integral column > boundary, as defined by the ASCII font of the face. > > Would this be useful enough to implement? If it is not hard implement, I suggest provide this patch, so we can try it and provide feekback. --