From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ligatures Date: Tue, 19 May 2020 18:36:42 +0300 Message-ID: <83wo586inp.fsf@gnu.org> References: <20200517124125.000013a4@web.de> <97C7EAB7-10AB-4702-ABC8-EB6C1C50ABDB@gnu.org> <20200517165953.000044d2@web.de> <83lflqblp0.fsf@gnu.org> <83ftbybio3.fsf@gnu.org> <83zha69xs2.fsf@gnu.org> <83367x9qeq.fsf@gnu.org> <875zcs32fv.fsf@Otto.invalid> <83eerg80u6.fsf@gnu.org> <834ksc7za9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="8910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stromeko@nexgo.de, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 19 17:37:33 2020 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 1jb4JB-0002Cl-04 for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 17:37:33 +0200 Original-Received: from localhost ([::1]:52968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb4JA-0003ZE-2K for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 11:37:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb4IT-0002DB-Qm for emacs-devel@gnu.org; Tue, 19 May 2020 11:36:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53755) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb4IR-0004t6-0x; Tue, 19 May 2020 11:36:47 -0400 Original-Received: from [176.228.60.248] (port=1427 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jb4IO-00020S-KC; Tue, 19 May 2020 11:36:45 -0400 In-Reply-To: (message from Pip Cet on Tue, 19 May 2020 15:11:27 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:250952 Archived-At: > From: Pip Cet > Date: Tue, 19 May 2020 15:11:27 +0000 > Cc: Stromeko@nexgo.de, emacs-devel@gnu.org > > On Tue, May 19, 2020 at 2:52 PM Eli Zaretskii wrote: > > Btw, there's one subtle issue that will need to be resolved if we are > > to have this feature of "sub-glyph" cursor movement inside composed > > characters. The way we currently display the default block cursor is > > by simply redrawing the glyph at point in reverse video. So we don't > > have a way of displaying a cursor that "covers" only part of a glyph. > > I thought that was what glyph_row->clip was for. We could use that, but that's not the main problem. After all, clipping while drawing is simple and doesn't need any special help. The problem is that we need to change how the cursor is drawn, from the control flow POV. We'd need to audit the code and see that the information required for drawing the cursor is available when we are drawing the text. And then there's the popular use case where nothing changes except the cursor position, in which case no text is redrawn at all. > > To make this happen, we'd probably need to draw the cursor as part of > > drawing the glyph foreground and/or background, which is against the > > I believe that's a change we should make anyway: late cursor drawing > makes sense on TTYs with physical cursors, but on GUI backends, we > should simply use a special face for drawing the struct glyph a cursor > is on, IMHO. It cannot be a single face, because the "thing under cursor" can be anything, and can have different colors. We will need to merge faces, which is slower than the current simple but effective method, which completely sidesteps the issue. in any case, using a face doesn't solve the main problem, as we'd still need to draw the glyph with partial colors.