[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to detect that current font does not have particular unicode cha
From: |
Eli Zaretskii |
Subject: |
Re: how to detect that current font does not have particular unicode char |
Date: |
Sat, 19 Dec 2020 14:00:07 +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.