unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rms@gnu.org
Cc: psainty@orcon.net.nz, luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: Can watermarking Unicode text using invisible differences sneak through Emacs, or can Emacs detect it?
Date: Mon, 24 Jan 2022 14:14:06 +0200	[thread overview]
Message-ID: <834k5tl4a9.fsf@gnu.org> (raw)
In-Reply-To: <E1nBr3H-0002nk-HU@fencepost.gnu.org> (message from Richard Stallman on Sun, 23 Jan 2022 23:33:59 -0500)

> From: Richard Stallman <rms@gnu.org>
> Cc: psainty@orcon.net.nz, luangruo@yahoo.com, emacs-devel@gnu.org
> Date: Sun, 23 Jan 2022 23:33:59 -0500
> 
>   > We don't have a way of determining whether a terminal can display
>   > ligatures.
> 
> Could we do it via terminfo?  We can define any capabilities we like.

I don't think this is feasible.  But before we discuss this, I think
we need to clear some fundamental misunderstanding about this, see
below.

>   > > I doubt any user wants to see a diamond instead of `fi'.
> 
>   > Is this what really happens for you, on your terminal?
> 
> Yes.  A few days ago I put point on a diamond, typed C-u C-x =,
> and was told it was a ligature for `fi'.

How did that ligature get written to the screen?  Was it present
literally in some text that Emacs displayed?  If not, how did it come
into existence, in the form of a diamond?  Emacs doesn't produce such
ligatures on TTY frames.

> I didn't save details of what text I was looking at, but I suspect
> it was a web page that a script fetched and emailed to me.

If that web page included a literal fi ligature, there's little we can
do in Emacs, because we don't produce that character.  Of course, one
can set up a display table where ligatures like fi are displayed as
two characters, but that is a separate issue, very far from what we
were discussing in this thread.  So let's please leave the literal fi
display alone, because it will take us far away from the original
issue.

The original issue is with sequences of characters that are supposed
to be composed on display, because that's where the zero-width
characters play their role.  When several characters are supposed to
be composed on a text-mode display, Emacs simply writes them to the
terminal one after another, and expects the terminal to display them
as a ligature.  The only difference between what Emacs does in this
case and what it does when no character composition is expected is
that in the former case Emacs expects the terminal to produce just one
glyph that takes just one column on display.  Emacs never actually
writes the ligature's code to the TTY, unless that code is literally
present in the text.

So I don't see how querying the terminal about ligature support will
help us in the case we are discussing, nor do I see how is that
relevant.  In any case, ligature support is not just the ability of a
terminal, it also requires certain features from the font used to
display text, and on TTY frames Emacs doesn't know which font is being
used where.  Moreover, there's any number of possible ligatures, and
which ones are supported depends on the font, so a question like "are
ligatures supported" has no meaningful answer unless you also specify
the font and the particular ligature.



  parent reply	other threads:[~2022-01-24 12:14 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19  4:15 Can watermarking Unicode text using invisible differences sneak through Emacs, or can Emacs detect it? Richard Stallman
2022-01-19  4:47 ` Po Lu
2022-01-19 10:05   ` Phil Sainty
2022-01-19 11:43     ` Eli Zaretskii
2022-01-21  4:13       ` Richard Stallman
2022-01-21  7:49         ` Eli Zaretskii
2022-01-22  4:37           ` Richard Stallman
2022-01-22  6:58             ` Eli Zaretskii
2022-01-24  4:33               ` Richard Stallman
2022-01-24  5:06                 ` Po Lu
2022-01-25  4:17                   ` Richard Stallman
2022-01-25  4:58                     ` Po Lu
2022-01-24 12:14                 ` Eli Zaretskii [this message]
2022-01-25  4:16                   ` Richard Stallman
2022-01-25  6:35                     ` Eli Zaretskii
2022-01-25 12:12                       ` Eli Zaretskii
2022-01-25  4:16                   ` New feature: displaying ligature characters in the buffer Richard Stallman
2022-01-25  6:31                     ` Eli Zaretskii
2022-01-27  4:12                       ` Richard Stallman
2022-01-27  7:58                         ` Eli Zaretskii
2022-01-25 11:08                   ` Can watermarking Unicode text using invisible differences sneak through Emacs, or can Emacs detect it? Kévin Le Gouguec
2022-01-25 12:38                     ` Eli Zaretskii
2022-01-26  3:39                       ` Richard Stallman
2022-01-26  5:38                         ` Eli Zaretskii
2022-01-28 13:04                           ` Richard Stallman
2022-01-28 13:31                             ` Eli Zaretskii
2022-01-30  4:17                               ` Richard Stallman
2022-01-30  7:36                                 ` Eli Zaretskii
2022-01-31  4:02                                   ` Richard Stallman
2022-01-31 13:05                                     ` Eli Zaretskii
2022-02-01  5:06                                       ` Richard Stallman
2022-02-01 14:57                                         ` Eli Zaretskii
2022-02-02  3:58                                           ` Richard Stallman
2022-02-02 12:28                                             ` Eli Zaretskii
2022-02-03  4:23                                               ` Richard Stallman
2022-02-03  7:53                                                 ` Eli Zaretskii
2022-02-03  8:16                                                   ` Yuri Khan
2022-02-03  9:26                                                     ` Eli Zaretskii
2022-02-04  3:52                                                   ` Richard Stallman
2022-02-04  4:56                                                     ` Yuri Khan
2022-02-06  4:13                                                       ` Richard Stallman
2022-02-04  8:10                                                     ` Eli Zaretskii
2022-02-06  4:13                                                       ` Richard Stallman
2022-02-03 20:28                                                 ` Tomas Hlavaty
2022-02-04  7:07                                                   ` Eli Zaretskii
2022-02-05  4:20                                                   ` Richard Stallman
2022-02-05 13:55                                                     ` Tomas Hlavaty
2022-02-05 14:06                                                       ` Eli Zaretskii
2022-02-05 14:12                                                         ` Eli Zaretskii
2022-02-06  1:29                                                           ` Tomas Hlavaty
2022-02-06  8:30                                                             ` Eli Zaretskii
2022-02-06 10:38                                                               ` Tomas Hlavaty
2022-02-06 10:44                                                                 ` Eli Zaretskii
2022-02-06 10:54                                                                 ` Andreas Schwab
2022-02-06  1:10                                                         ` Tomas Hlavaty
2022-02-06  4:16                                                         ` Richard Stallman
2022-02-06  4:16                                                       ` Richard Stallman
2022-02-06 11:29                                                         ` Tomas Hlavaty
2022-02-04  3:52                                                 ` Richard Stallman
2022-02-04  8:03                                                   ` Eli Zaretskii
2022-02-06  4:13                                                     ` Richard Stallman
2022-02-06  8:56                                                       ` Eli Zaretskii
2022-02-07  5:11                                                         ` Richard Stallman
2022-02-07 13:16                                                           ` Eli Zaretskii
2022-02-08  3:55                                                             ` Richard Stallman
2022-02-08 12:20                                                               ` Eli Zaretskii
2022-02-09  4:06                                                                 ` Richard Stallman
2022-02-09 13:50                                                                   ` Eli Zaretskii
2022-02-10  3:57                                                                     ` Richard Stallman
2022-02-10  6:26                                                                       ` Eli Zaretskii
2022-02-12  3:57                                                                         ` Richard Stallman
2022-02-12  7:36                                                                           ` Eli Zaretskii
2022-02-14  4:13                                                                             ` Richard Stallman
2022-02-14 12:07                                                                               ` Eli Zaretskii
2022-02-15  4:33                                                                                 ` Richard Stallman
2022-02-15 13:32                                                                                   ` Eli Zaretskii
2022-02-16  4:14                                                                                     ` Richard Stallman
2022-02-16 12:10                                                                                       ` Eli Zaretskii
2022-02-19  4:54                                                                                         ` Richard Stallman
2022-02-12 20:10                                                                           ` Tomas Hlavaty
2022-02-14  4:14                                                                             ` Richard Stallman
2022-01-26  8:20                         ` Andreas Schwab
2022-01-27  4:13                           ` Richard Stallman
2022-01-27  6:39                             ` Eli Zaretskii
2022-01-27  8:13                               ` Kévin Le Gouguec
2022-01-27  9:55                                 ` Eli Zaretskii
2022-01-27 10:29                                   ` Eli Zaretskii
2022-01-27 17:36                                     ` Kévin Le Gouguec
2022-01-27 18:38                                       ` Eli Zaretskii
2022-01-20  3:17     ` Richard Stallman
2022-01-20  4:54       ` Phil Sainty
2022-01-20  6:39         ` tomas
2022-01-20 17:58           ` [External] : " Drew Adams
2022-01-22  4:37           ` Richard Stallman
2022-01-22  5:16             ` Po Lu
2022-01-20  7:57         ` Eli Zaretskii
2022-01-20  6:35       ` Tim Cross
2022-01-20  7:39         ` tomas
2022-01-20  8:20         ` Eli Zaretskii
2022-01-20  7:48       ` Eli Zaretskii
2022-01-20  8:17         ` Lars Ingebrigtsen
2022-01-21  4:14         ` Richard Stallman
2022-01-19  8:20 ` Eli Zaretskii
2022-01-19 17:36 ` T.V Raman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834k5tl4a9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=psainty@orcon.net.nz \
    --cc=rms@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).