Function: font-has-char-p
font-has-char-p is a function defined in font.c.
Signature
(font-has-char-p FONT CH &optional FRAME)
Documentation
Return non-nil if FONT on FRAME has a glyph for character CH.
FONT can be either a font-entity or a font-object. If it is
a font-entity and the result is nil, it means the font needs to be
opened (with open-font) to check.
FRAME defaults to the selected frame if it is nil or omitted.
Probably introduced at or before Emacs version 29.1.
Source Code
// Defined in /usr/src/emacs/src/font.c
{
struct frame *f;
CHECK_FONT (font);
CHECK_CHARACTER (ch);
if (NILP (frame))
f = XFRAME (selected_frame);
else
{
CHECK_FRAME (frame);
f = XFRAME (frame);
}
if (font_has_char (f, font, XFIXNAT (ch)) <= 0)
return Qnil;
else
return Qt;
}