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: how to detect that current font does not have particular unicode char Date: Sat, 19 Dec 2020 14:00:07 +0200 Message-ID: <83tusit394.fsf@gnu.org> References: <837dpeupb0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5548"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: yyoncho Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 19 13:01:33 2020 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 1kqavV-0001Kx-GC for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Dec 2020 13:01:33 +0100 Original-Received: from localhost ([::1]:50332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqavU-0005FQ-Hg for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Dec 2020 07:01:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqauS-0004i5-PH for emacs-devel@gnu.org; Sat, 19 Dec 2020 07:00:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54740) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqauS-0003dj-I3; Sat, 19 Dec 2020 07:00:28 -0500 Original-Received: from [176.228.60.248] (port=1118 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqauQ-00030r-QD; Sat, 19 Dec 2020 07:00:27 -0500 In-Reply-To: (message from yyoncho on Sat, 19 Dec 2020 13:33:05 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:261247 Archived-At: > From: yyoncho > Date: Sat, 19 Dec 2020 13:33:05 +0200 > Cc: emacs-devel > > What kind of fallback? > > I want to detect if char is visible and use a different one. E. g. bulb can be replaced with "!". But that's misleading, isn't it? The user could think the character really was "!". You could instead set up the glyphless-char-display char-table to have "!" in the slot for U+1F4A1, then Emacs will display the "!" character inside a box, which at least cannot dupe the user. > > I tried to use char-displayable-p but it seems like it is not > > what I am looking for. > > I believe you want font-get-glyphs. > > I will try that out. I am not sure what FONT-OBJECT parameter stands for? The return value of one of functions that return such objects. I think in your case font-at will be useful in that role.