From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: scratch/emoji vs emacs that maybe =?utf-8?Q?can=CA=BCt?= display emojis Date: Sun, 07 Nov 2021 17:31:17 -0500 Message-ID: References: <87y263ko4i.fsf@gmail.com> <87cznek745.fsf@gnus.org> <87bl2yk6qz.fsf@gmail.com> <87wnlkeysw.fsf@gnus.org> <87sfw8eyi0.fsf@gnus.org> <837ddk7wtb.fsf@gnu.org> <871r3rg099.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5032"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , rpluim@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 07 23:32:48 2021 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 1mjqiV-00016e-KI for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 23:32:47 +0100 Original-Received: from [::1] (port=47888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjqiT-0000kd-Rx for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Nov 2021 17:32:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjqhI-0008SZ-UE for emacs-devel@gnu.org; Sun, 07 Nov 2021 17:31:32 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7970) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjqhG-0005iF-Vo; Sun, 07 Nov 2021 17:31:32 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5000B4407F7; Sun, 7 Nov 2021 17:31:29 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AFDE94407D3; Sun, 7 Nov 2021 17:31:27 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1636324287; bh=ugR3eBvHp6v+k+gkj74Pe5kiweeNiGZ5luAFmkqSxZM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XeRO97paHmmvLbi/kow2S321WJ0ms730yIaf1zbZdCvsczEn+CT/N/cRH9LVtcSaq T/7sOZ2BzcJLc4rXgTdyOkixnEkyTlgARAlJGCpoLNpUmiHMzoEthlvwMhn4Y+isRm +0RprMgKk262LAf3cqWGIQ3Z92ste4LfVvHOfyoX6qkvbOBbnl49CyOfWsYYa0jQlt fMJXn6LkomjOyInlZeNKnc1hPz2Oc/fTE9Vx8Y20qeN7kxLna124WphLYc3PqkoJ8T N3gFAf9qdabVUkMmMssTM/U6DUS2H2oqPCaws4UBWpM0rOPtQYQ1GgIz/p3PzkiBZe 4lzTwpIKyLZJA== Original-Received: from ceviche (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 697B5120306; Sun, 7 Nov 2021 17:31:27 -0500 (EST) In-Reply-To: <871r3rg099.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 07 Nov 2021 21:48:50 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:278991 Archived-At: Lars Ingebrigtsen [2021-11-07 21:48:50] wrote: > Eli Zaretskii writes: >> We could perhaps introduce some heuristics based on the first >> character of the composition, for example that the result of composing >> CH cannot be narrower than CH itself. But that will only work up to a >> point. E.g., AFAIR some Emoji has the width of 1. > Perhaps it depends on the font, too? I'm pretty sure that none of the > composed emojis in Noto Color Emoji have a width of 1, but that's > basically the only emoji font I've been futzing around with. >> And then there are terminal emulators that do some preposterous stuff, >> assuming that their tail can wag the dog. See PROBLEMS and search for >> "kitty", for some fun. > Heh. How 'bout we add a simple little hack to Emacs: when running in a tty and we need to display something like an emoji, use a local DNN (deep neural network) to guess the width that will be used for the char, then contact an fsf.org service that connects to a nearby camera, grabs a few frames, passes them to text recognition DNN to estimate the number of text columns that the terminal used when displaying this char, send the result back to Emacs and if the initial guess was wrong adjust the local DNN and redisplay. WDYT? Stefan PS: OK, we could replace the fsf.org service + remote DNN with say, the user's brain, but what would be the fun in that?