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.help Subject: Re: Using overlays to hide emojis while preserving fill Date: Sat, 22 Jun 2024 10:48:46 +0300 Message-ID: <8634p5ju3l.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8026"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 22 09:49:16 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1sKvUq-0001tR-Fd for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 09:49:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKvUQ-0000Lb-H9; Sat, 22 Jun 2024 03:48:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKvUO-0000LC-LB for help-gnu-emacs@gnu.org; Sat, 22 Jun 2024 03:48:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKvUO-0004Ym-DC for help-gnu-emacs@gnu.org; Sat, 22 Jun 2024 03:48:48 -0400 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=AyLJPL+xvr5lsymXpLAH8zDThhZJ/LhSK1WSoJ2Bzwg=; b=WizVgZob1//e Nk+l1INbBX1gCTPO45FAOl0r+I0ULfPcrXckwpRUBBV3icUXyw0/zqRCUOt95qELDGNwN8NFU8O/e 9SX9/PzVj5unBtyf/gpNyIA+Zs5eKznBQLexBqz2gIyG7MJCOixGZhOqzK4DQxXbZ/Pbw8oyXJA39 HkHDkHynyI3UJhQUJWPVcvVCuPp/xqeTCLJ9Q2PZI+g9NKQ042l8H1dBcKVHqz569Tc33Szu8Nj5m wyXGNHUu0dJtJvaqW5lTmkyjznU/LxVvKZnEfDQOJmIivZYlqCxGaGdB6NAEvXPCUPtkh4Cw3Et2z afy9LJ4BPpVA96qu+/X9Cw==; In-Reply-To: (message from Psionic K on Sat, 22 Jun 2024 11:21:39 +0900) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146931 Archived-At: > From: Psionic K > Date: Sat, 22 Jun 2024 11:21:39 +0900 > > The animations in dslide occasionally reveal one character at a time. > My initial implementation just sets the foreground to the background > color. This doesn't work for emojis. I suppose I can use the display > property, but I need to preserve the fill size in that case. What's a > consistent way to obscure the text while preserving its dimensions? If you are asking how to compute the width of text (including text that shows Emoji), then I'd expect string-pixel-width to be (at least part of) the answer.