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.devel Subject: Re: Variable pitch text filling Date: Fri, 03 Dec 2021 13:31:26 +0200 Message-ID: <83a6hh9b75.fsf@gnu.org> References: <87ilwft1ph.fsf@gnus.org> <875ysbxal0.fsf@gnus.org> <83h7bvugxm.fsf@gnu.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11485"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, larsi@gnus.org, emacs-devel@gnu.org To: "Feng Shu" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 03 12:32:59 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 1mt6oB-0002dq-A3 for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 12:32:55 +0100 Original-Received: from localhost ([::1]:40376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt6o9-0005gH-MM for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 06:32:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt6n6-00050Z-CL for emacs-devel@gnu.org; Fri, 03 Dec 2021 06:31:48 -0500 Original-Received: from [2001:470:142:3::e] (port=38040 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt6n5-0005wW-0E; Fri, 03 Dec 2021 06:31:47 -0500 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=zg82b8QlD45LVauasudwParL1LXDyyaDXauAYGg3PSI=; b=ZtACeI6nrzna J28INHCaKLMCU9URR0u7TReCWTDJgILl7FA0hxEBwKh4IaWy5JFqmkzENrAR/HGZYDP3ho5e6mq3c ylZgoUh9YgkWlYKdMHR3KD/99oYLhXiPeNwdekVVbw9JQlp9Rup1gtSKQ7UGulMpwO9sEnMFawFnD YVE+He/fwUA2/5EIm1/DG4Z8ZWUr+PLO0BAzCRwavf9kIrS5Dwv0QE1XkLxgPVBBTdNswFkw7UJsy kP8GzQULudnzr1limquek53NSud+oiPplZ1PzQsLH8cEiUPWnPmMWPczKmjaCXBAOGw6gfQFumP6/ 5zXBcJIMXqcU0eB5JDF6Xw==; Original-Received: from [87.69.77.57] (port=3486 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt6mw-0001rP-2S; Fri, 03 Dec 2021 06:31:44 -0500 In-Reply-To: <878rx29k5n.fsf@163.com> (tumashu@163.com) 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:280820 Archived-At: > 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?