From: Pip Cet <pipcet@gmail.com>
To: David Fussner <dfussner@googlemail.com>
Cc: 41645@debbugs.gnu.org
Subject: bug#41645: 27.0.91; Combining Grapheme Joiner (#x34f) gui artifacts
Date: Tue, 02 Jun 2020 14:35:09 +0000 [thread overview]
Message-ID: <87367dzgbm.fsf@gmail.com> (raw)
In-Reply-To: <CADF+Rthdept+niMhfsmRtrEWnEacFRUJU8ZwBnftpULj8ditTQ@mail.gmail.com> (David Fussner's message of "Tue, 2 Jun 2020 14:45:50 +0100")
David Fussner <dfussner@googlemail.com> 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 <pipcet@gmail.com> wrote:
>>
>> On Mon, Jun 1, 2020 at 7:48 PM Pip Cet <pipcet@gmail.com> 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.
next prev parent reply other threads:[~2020-06-02 14:35 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 13:45 bug#41645: 27.0.91; Combining Grapheme Joiner (#x34f) gui artifacts David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-01 15:29 ` Eli Zaretskii
2020-06-01 15:50 ` Pip Cet
2020-06-01 16:06 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-01 16:36 ` Eli Zaretskii
2020-06-01 17:44 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-01 18:27 ` Pip Cet
2020-06-01 16:14 ` Eli Zaretskii
2020-06-01 18:09 ` Pip Cet
2020-06-01 18:37 ` Eli Zaretskii
2020-06-01 19:35 ` Eli Zaretskii
2020-06-01 20:15 ` Pip Cet
2020-06-01 19:48 ` Pip Cet
2020-06-01 22:37 ` Pip Cet
2020-06-02 13:45 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-02 13:57 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-02 14:06 ` Pip Cet
2020-06-02 14:32 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-02 14:35 ` Pip Cet [this message]
2020-06-02 14:39 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-02 15:51 ` Eli Zaretskii
2020-06-02 15:59 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-02 16:07 ` Eli Zaretskii
2020-06-02 19:21 ` Pip Cet
2020-06-02 19:49 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-03 14:20 ` Eli Zaretskii
2020-06-03 14:58 ` Pip Cet
2020-06-03 15:58 ` Eli Zaretskii
2020-06-03 20:23 ` Pip Cet
2020-06-04 2:36 ` Eli Zaretskii
2020-06-04 6:58 ` Pip Cet
2020-06-04 13:31 ` Eli Zaretskii
[not found] ` <874krq4fd8.fsf@gmail.com>
2020-06-05 7:45 ` Eli Zaretskii
2020-06-05 8:31 ` Pip Cet
2020-06-05 15:54 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-06-05 17:28 ` Eli Zaretskii
2020-06-02 15:52 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87367dzgbm.fsf@gmail.com \
--to=pipcet@gmail.com \
--cc=41645@debbugs.gnu.org \
--cc=dfussner@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.