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 10:10:31 +0200 Message-ID: <83czme85xk.fsf@gnu.org> References: <87ilwft1ph.fsf@gnus.org> <87lf19r7uv.fsf@gnus.org> <83tufxy7f0.fsf@gnu.org> <83o865xuf3.fsf@gnu.org> <87v90b136m.fsf@gnus.org> <83tufvukjj.fsf@gnu.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20444"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: casouri@gmail.com, tumashu@163.com, larsi@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 03 09:11:30 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 1mt3fG-00057p-I8 for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 09:11:30 +0100 Original-Received: from localhost ([::1]:54112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mt3fE-00020i-FL for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Dec 2021 03:11:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mt3eV-0001Lx-PB for emacs-devel@gnu.org; Fri, 03 Dec 2021 03:10:43 -0500 Original-Received: from [2001:470:142:3::e] (port=50726 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 1mt3eV-0006l5-7j; Fri, 03 Dec 2021 03:10:43 -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=Dwm5Y2GsoiU/CS6N6PzJhD1ZAP/qyyxJhjNjzy9w1gg=; b=HkXjis1KQnwj g4MSsT29yvd637USp+PMMtWHKvTByBf5NWtvsObIY77fJfOo2sxTS3vjah+A0jvsHV3QHdvuT84yd 9s3VtTXT/m5AOY+k0XZkcnyrB7IVNdaXt+53Wwxo/CT/lzpWGsoRROqVHxH/5Pqt1HLdg5FD+R7Ky RODfyVKOZtDNrvGyjby7054A0A0Cm8UWnAzxJttmR6zd+JEzMWzK9Iooo4U29quldMuGb/1X22pz2 43S6joVEglqWSde/Zqp/3Mk5yAGV8XHe+65vtj/OOwQ6Cpwm/H6KIJoTERK50ZlmlbCI3xdd9BvIh vUAGYYlm5OI/asmRsgDnFA==; Original-Received: from [87.69.77.57] (port=3056 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 1mt3eU-0000ht-I4; Fri, 03 Dec 2021 03:10:43 -0500 In-Reply-To: <83sfva92vo.fsf@gnu.org> (message from Eli Zaretskii on Thu, 02 Dec 2021 22:18:51 +0200) 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:280813 Archived-At: > Date: Thu, 02 Dec 2021 22:18:51 +0200 > From: Eli Zaretskii > Cc: tumashu@163.com, larsi@gnus.org, emacs-devel@gnu.org > > > Emacs adds spaces after the character under point, but the space obstructs the character after. If I hold on C-f and go over every character, their alignment are fixed: > > Yes, I see it as well. Strange. I guess I'm missing something here. > Hmm... 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.