From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel 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 Message-ID: <837dalfp4t.fsf@gnu.org> References: <87sftk49ih.fsf@yahoo.com> <837dawt0h4.fsf@gnu.org> <838rv9plyf.fsf@gnu.org> <837dasntoj.fsf@gnu.org> <834k5tl4a9.fsf@gnu.org> <87mtjkt6m9.fsf@gmail.com> <83ilu8htws.fsf@gnu.org> <87ee4uykli.fsf@igel.home> <83h79pfzrm.fsf@gnu.org> <87y231k34e.fsf@gmail.com> <83bkzxfqpe.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: psainty@orcon.net.nz, luangruo@yahoo.com, schwab@linux-m68k.org, rms@gnu.org, emacs-devel@gnu.org To: kevin.legouguec@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 27 11:32:44 2022 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 1nD256-000AYg-3Y for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Jan 2022 11:32:44 +0100 Original-Received: from localhost ([::1]:54250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nD254-0000A1-OE for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Jan 2022 05:32:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD21z-0007ht-59 for emacs-devel@gnu.org; Thu, 27 Jan 2022 05:29:31 -0500 Original-Received: from [2001:470:142:3::e] (port=52988 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD21x-00087E-NC; Thu, 27 Jan 2022 05:29:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=k3PfUBBUWHIs2jycIO4F+wojvVKCzYtWyxH0du+yCt8=; b=UKt7PXdCSr54 GyUeqnvvIwwYyjpsiMe0J3Armt8G0+81Mx4kmCDwMfK/wfF1OtT4/hPVkgAzcWHZ26w4dQecsMZMb ZBjGB6zsrIyJS8XorKpO5j3o/3btu/QWxF6j55gxAa8JuO67TPhT+QkOFYEnv0WWo12fQdM8nm3uU 4mReflGaXwQPVrrxLo5Xr2oKmosK8vwcvLBMy8VMQFplR709i1e5fG08iSKK6KjLn+ZxFJrhkZ6Cs gS/Fvww/0pKf2PWrUihgld6LKH699IaQP48Gkt7tZCIiX2pVtWc8RX2lyzIK9WImneTkR9fjRyO4S rHIND4AeB5zNKSopQnZ7mg==; Original-Received: from [87.69.77.57] (port=3147 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD21w-0006kd-65; Thu, 27 Jan 2022 05:29:28 -0500 In-Reply-To: <83bkzxfqpe.fsf@gnu.org> (message from Eli Zaretskii on Thu, 27 Jan 2022 11:55:25 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:285482 Archived-At: > Date: Thu, 27 Jan 2022 11:55:25 +0200 > From: Eli Zaretskii > 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;