From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#41645: 27.0.91; Combining Grapheme Joiner (#x34f) gui artifacts Date: Tue, 02 Jun 2020 14:35:09 +0000 Message-ID: <87367dzgbm.fsf@gmail.com> References: <83zh9merd4.fsf@gnu.org> <83wo4qepab.fsf@gnu.org> <83lfl6eiod.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2639"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 41645@debbugs.gnu.org To: David Fussner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 02 16:37:06 2020 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 1jg82L-0000Ux-VH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jun 2020 16:37:06 +0200 Original-Received: from localhost ([::1]:60982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg82L-0002Hy-0W for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jun 2020 10:37:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg81K-0001Ll-Ge for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg81K-0003jB-7K for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jg81K-00070i-4h for bug-gnu-emacs@gnu.org; Tue, 02 Jun 2020 10:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jun 2020 14:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41645 X-GNU-PR-Package: emacs Original-Received: via spool by 41645-submit@debbugs.gnu.org id=B41645.159110853526882 (code B ref 41645); Tue, 02 Jun 2020 14:36:02 +0000 Original-Received: (at 41645) by debbugs.gnu.org; 2 Jun 2020 14:35:35 +0000 Original-Received: from localhost ([127.0.0.1]:40536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg80p-0006zP-8J for submit@debbugs.gnu.org; Tue, 02 Jun 2020 10:35:35 -0400 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:54801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg80k-0006z9-7x for 41645@debbugs.gnu.org; Tue, 02 Jun 2020 10:35:30 -0400 Original-Received: by mail-wm1-f45.google.com with SMTP id g10so3162884wmh.4 for <41645@debbugs.gnu.org>; Tue, 02 Jun 2020 07:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iD8cQMMXXjtYTv/34NKYIsVp01JszTmRt1lHetwGWws=; b=TlE36kaKF3987rKMkx3SAEsuWoXN0TQZCWpKpfTGwMo3T0x8wWsS8wdrqKWUu2YOHo mULddIwXRxJaDOUf1Vx5yns8bELspitkfi65JkVNtEcwtWYi7IGUd8Mex5MEjao4VxFn inLCHlLkzAoMnLhLQCy0ACEN4rCxAbSCFKXC+SWIc39/3JqoGk4ClM9zeoRfcaaWYwai /Tf932VWvd/ddT+PduBloS8ua6rKZcw1R7RRCQj5G2C8txnf45KFkWYSaRzR52LqGzXd mnaOKlt6Nvmt8Gt/XVfZgu7sc6a3HaSfEc5JpJho1Fq/uQ3P7KaE1n5w+yr3H3B21AVL yVnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=iD8cQMMXXjtYTv/34NKYIsVp01JszTmRt1lHetwGWws=; b=MX7FuO3kvhdPzwQc6WQolwVhgtb+Viwceay2IjGYIp/ihRemU1tsfkeovX1WBXX9T5 iXn3r+A+g6gKISETNdnOjZWmV6gbubCpAI4HRiiLNQqRQ4cR+NR0enUU7dsXk07Il7Lk +7FEThaneZvLD8Dd+Cf9aaEPxodfzJRq0L0X89LOWTOwPu+tHupHhjeXvwPb9okOxTlP VBqz/io2I5EvFOxR7cBcPplXg0IIRLPsutlaNONy84OwZFId9CNK8bZWJfgeEgTiMh+P OakdV7Ac7uFc6GzN1DXGtJLSTXjQCf+dxwsiCW7gFJ2XhweEbHK6Pm3nkQYgI5JndXqE E5ZQ== X-Gm-Message-State: AOAM5303UIoN7dv6eLczFUdVF5vPkQ3nlXAQyz//QMng/JvTgN1bfv/S zerslUeuiSxDq7c+khCViDps61VAj3M= X-Google-Smtp-Source: ABdhPJz7t2e4GiFZ1vJX5Jb7WOMUej+ABKPQjWJpEhdpkoQ+9yQYqix3JLRaCkOcC14aUFJy2J44Cw== X-Received: by 2002:a1c:c904:: with SMTP id f4mr4364847wmb.69.1591108520029; Tue, 02 Jun 2020 07:35:20 -0700 (PDT) Original-Received: from chametz (tor-exit-16.zbau.f3netze.de. [185.220.100.243]) by smtp.gmail.com with ESMTPSA id y19sm3702448wmi.6.2020.06.02.07.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 07:35:19 -0700 (PDT) In-Reply-To: (David Fussner's message of "Tue, 2 Jun 2020 14:45:50 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:181398 Archived-At: David Fussner writes: > A couple of data points, in case they're helpful: Thanks again for testing. > On 27.0.91 _unpatched_, I see the artifact whenever the font of the > CGJ is different from that of the glyph before it, no matter which > script I'm using. When the font of the CGJ and the previous glyph are > the same, I don't see the artifact, except in Hebrew, where it's still > present. Which font are you using for Hebrew text? > C-u C-x = displays the CGJ on its own, as a separate glyph, > whenever it's used in Hebrew and also whenever its font doesn't match > that of the glyph before it. When the font does match, in Latin or > Greek script, the cursor doesn't stop on the CGJ, and C-u C-x = shows > it as composed with the previous character. That sounds as it should be. I'm not sure I understand what you're seeing in Hebrew text, though: you said you saw the artifact there, but also that the CGJ is displayed as a separate glyph. Is that corrcet? > With Pip Cet's second patch, 27.0.91 shows exactly the same behavior > with C-u C-x =, but the visual artifact never appears, at least in my > testing, neither in Hebrew nor in the LTR scripts. So that sounds like an improvement. While I think we definitely want the patch I sent , it doesn't solve the real issue: zero-width glyph strings. If we want to allow those, a lot of the display code has to be changed (we're going to have to figure out how to show the cursor, for starters); if we don't, that's a change to the composition-function interface, albeit a minor one. > Hope this helps. > > On Mon, 1 Jun 2020 at 23:37, Pip Cet wrote: >> >> On Mon, Jun 1, 2020 at 7:48 PM Pip Cet wrote: >> > > > Indeed, the composition gstring is a single zero-width glyph. >> > > See the composition information above: my interpretation of it is that >> > > the composed glyph is not zero-width. >> > >> > ... something is odd here, I agree. >> >> I think it's a very odd combination of things: >> 1. a font which defines an isolated CGJ to have zero width >> 2. an isolated CGJ appearing in the first place (in this case, because >> another font does not support CGJ) >> 3. the fall-back [nil 0 compose-gstring-for-graphic] rule defined for >> codepoint #x34f >> 4. compose-gstring-for-graphic attempting to salvage non-spacing >> characters not following base characters, and producing zero-width >> lgstrings from zero-width lglyphs >> >> Avoiding any of the four will avoid the problem. (1) is something we >> cannot fix directly. (2) is also something that a user may want. (3) >> could be dropped, and (4) could be expanded to take care of the >> zero-width case. >> >> However, as long as zero-width gstrings can somehow slip through, I >> suggest we also apply the patch I sent, assuming it fixes the problem. >> >> We might consider simply prohibiting zero-width zero-lbearing >> zero-rbearing gstrings, the way we prohibit zero-width zero-lbearing >> zero-rbearing characters in the code I posted.