emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can watermarking Unicode text using invisible differences sneak thro


From: Eli Zaretskii
Subject: Re: Can watermarking Unicode text using invisible differences sneak through Emacs, or can Emacs detect it?
Date: Thu, 27 Jan 2022 12:29:22 +0200

> Date: Thu, 27 Jan 2022 11:55:25 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: psainty@orcon.net.nz, luangruo@yahoo.com, schwab@linux-m68k.org,
>  rms@gnu.org, emacs-devel@gnu.org
> 
> > Reading the documentation of the various glyphless-* knobs, I wonder if
> > it would make sense to provide another group for
> > glyphless-char-display-control?  'no-font is not helpful on my TTY, IIUC
> > because terminal-coding-system says "utf-8-unix"?).
> > 
> > Maybe 'no-display, meaning (null (char-displayable-p CHAR))?
> 
> Isn't that what glyphless-char-display-control already does on a TTY
> for no-font?  We just need to set up the table for such characters.

Or maybe we should install the below?

diff --git a/src/term.c b/src/term.c
index 4c7a90a..ddf0e8e 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1632,9 +1632,13 @@ produce_glyphs (struct it *it)
     }
   else
     {
-      Lisp_Object charset_list = FRAME_TERMINAL (it->f)->charset_list;
+      struct terminal *t = FRAME_TERMINAL (it->f);
+      Lisp_Object charset_list = t->charset_list, char_glyph;
 
-      if (char_charset (it->char_to_display, charset_list, NULL))
+      if (char_charset (it->char_to_display, charset_list, NULL)
+         && (char_glyph = terminal_glyph_code (t, it->char_to_display),
+             NILP (char_glyph)
+             || (FIXNUMP (char_glyph) && XFIXNUM (char_glyph) >= 0)))
        {
          it->pixel_width = CHARACTER_WIDTH (it->char_to_display);
          it->nglyphs = it->pixel_width;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]