unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: yyoncho <yyoncho@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: how to detect that current font does not have particular unicode char
Date: Sat, 19 Dec 2020 14:00:07 +0200	[thread overview]
Message-ID: <83tusit394.fsf@gnu.org> (raw)
In-Reply-To: <CACCVLQWG2dW4LgxHbSVmazV_V7PdimReMPA9dpcVkFBnm5VJ2g@mail.gmail.com> (message from yyoncho on Sat, 19 Dec 2020 13:33:05 +0200)

> From: yyoncho <yyoncho@gmail.com>
> Date: Sat, 19 Dec 2020 13:33:05 +0200
> Cc: emacs-devel <emacs-devel@gnu.org>
> 
>  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.



      reply	other threads:[~2020-12-19 12:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-19  8:54 how to detect that current font does not have particular unicode char yyoncho
2020-12-19  9:18 ` Eli Zaretskii
2020-12-19 11:33   ` yyoncho
2020-12-19 12:00     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tusit394.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yyoncho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).