From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: yyoncho Newsgroups: gmane.emacs.devel Subject: Re: how to detect that current font does not have particular unicode char Date: Sat, 19 Dec 2020 13:33:05 +0200 Message-ID: References: <837dpeupb0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000050d02305b6cf9733" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 19 12:36:36 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 1kqaXL-0006MB-IH for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Dec 2020 12:36:35 +0100 Original-Received: from localhost ([::1]:45252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqaXK-0001Zi-L6 for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Dec 2020 06:36:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqaUE-0007iP-5S for emacs-devel@gnu.org; Sat, 19 Dec 2020 06:33:22 -0500 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:35237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqaUB-0002jv-FP; Sat, 19 Dec 2020 06:33:21 -0500 Original-Received: by mail-lf1-x130.google.com with SMTP id h22so2702716lfu.2; Sat, 19 Dec 2020 03:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WBpHmdGG2B8WZ/tHc1G4LG3W/d953sCQLU7vp2f34jY=; b=D+jsleDGnrJuzEzG4Nk4bmI1GARAFNMcUzdGjjTspFekUqesdkOpFlu+l5oPUXl9Rx F1yTTWrQnaItxaE0RVY7iRAXFjOHRD0W95rEph1h9pfxUx328ZHZx8wJ+Hag8Q7CrxyR 17p2hx3QGSF37VlurW8gVp3OHeeas1H2lXVXqAvPpwuZPkzjSFZSpzYlRoAkenZ3RF33 kPKcIiLDbgKTWgSVuJzIjVZDm3pdWBo9EjiW9Xo45BUyXRx8ykgLqANV+eIECh+0xCkL V978DgEB220amzvWgI0Q8S+CAw4S+9+f6deIpqjOioVwluMv+kmDdlqG99SUSFjQO7eC OTVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WBpHmdGG2B8WZ/tHc1G4LG3W/d953sCQLU7vp2f34jY=; b=jK7ByJRiTKLyQMAPNuINvdoIPQUZb247WHhC69KtAHF+HV3Xt2/stKbvcZtz90kXC6 0AsyH1gd/sEYOw8KqM88mhIIzs2WteIgmrDnPluD9ghTcRzu4B3w4ca0jDjh+lv+eHBS mvC+WT58PA+6GkG2xHUbWWjJ83Nh8KuuM7FiwhGH2duweOvthiljEWUSeYuTyasE2QUk pwwcHmiT6FQxyj5tA9A4fLnOAj//KF+XBDr605J6tqtZwLk/buJYVEhRkbsHsF4n9ipb LkFMqgWiVp99pMsB2/Id99XwFVfdR+ttbpW84bRH782K1qwyoGF/x8xEmHOsw9DhP4mM MFaA== X-Gm-Message-State: AOAM5323ELVodKJLQ5OPWay7NgFZw4lvJMrary/HjQi1hk9INsauERYH MQjSNJBVq1V+5uTFybDvuaMCF3hgvzhDQbA1Klugeo4gy5Cv+g== X-Google-Smtp-Source: ABdhPJz/vjFePrdd6yHJ7sxrLhYjKP7Z37i84WYw9YLpdFcLVEvohDzzVatwOiLE1002+C422NXsA6Ib+ZSwTlXw8ms= X-Received: by 2002:a2e:b5ab:: with SMTP id f11mr3445098ljn.57.1608377596693; Sat, 19 Dec 2020 03:33:16 -0800 (PST) In-Reply-To: <837dpeupb0.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=yyoncho@gmail.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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:261246 Archived-At: --00000000000050d02305b6cf9733 Content-Type: text/plain; charset="UTF-8" Thank you for your reply. What kind of fallback? I want to detect if char is visible and use a different one. E. g. bulb can be replaced with "!". > IOW, what did you intend to do if you find out > that the font configured by the user does NOT have a glyph for the > character in question? > Yes. > I'm asking because some fallbacks don't need to know whether a > particular font can display a particular character. But I'm not sure > those fallbacks are appropriate for your use case. > > > 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? Thanks, Ivan --00000000000050d02305b6cf9733 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for your reply.

What kind of fallback?=C2=A0

I want to detect if char is visible and use a different one. E. g. = bulb can be replaced with "!".=C2=A0
=C2=A0
IOW, what did you intend to do = if you find out
that the font configured by the user does NOT have a glyph for the
character in question?

Yes.
= =C2=A0
I'm asking because some fallbacks don't need to know whether a
particular font can display a particular character.=C2=A0 But I'm not s= ure
those fallbacks are appropriate for your use case.

> 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 w= ill try that out. I am not sure what FONT-OBJECT parameter stands for?

Thanks,
Ivan
--00000000000050d02305b6cf9733--