From: Eli Zaretskii Date: Sun, 31 Oct 2021 16:12:03 +0000 (+0200) Subject: ; * src/font.c (Ffont_has_char_p): Minor stylistic changes; doc fix. X-Git-Tag: emacs-29.0.90~3671^2~331 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a50571950daa7f261d61fcc5c5a4e6661085da76;p=emacs.git ; * src/font.c (Ffont_has_char_p): Minor stylistic changes; doc fix. --- diff --git a/src/font.c b/src/font.c index 089622c172b..f70054ea408 100644 --- a/src/font.c +++ b/src/font.c @@ -4979,13 +4979,16 @@ If the font is not OpenType font, CAPABILITY is nil. */) DEFUN ("font-has-char-p", Ffont_has_char_p, Sfont_has_char_p, 2, 3, 0, doc: - /* Say whether FONT-OBJECT has a glyph for CHAR. -If the optional FRAME parameter is nil, the selected frame is used. */) - (Lisp_Object font_object, Lisp_Object character, Lisp_Object frame) + /* 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. */) + (Lisp_Object font, Lisp_Object ch, Lisp_Object frame) { - struct frame* f; - CHECK_FONT (font_object); - CHECK_CHARACTER (character); + struct frame *f; + CHECK_FONT (font); + CHECK_CHARACTER (ch); if (NILP (frame)) f = XFRAME (selected_frame); @@ -4995,7 +4998,7 @@ If the optional FRAME parameter is nil, the selected frame is used. */) f = XFRAME (frame); } - if (font_has_char (f, font_object, XFIXNAT (character)) <= 0) + if (font_has_char (f, font, XFIXNAT (ch)) <= 0) return Qnil; else return Qt;