Skip to content

Commit

Permalink
docs(core): add documentation for +font--get-valid-args
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 11, 2024
1 parent e3e07c9 commit 8c3cb2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/me-lib.el
Original file line number Diff line number Diff line change
Expand Up @@ -2104,15 +2104,15 @@ scaling factor for the font in Emacs' `face-font-rescale-alist'. See the
"Arguments accepted by the `font-spec' function.")

(defun +font--get-valid-args (script-or-face font)
"Get valid arguments from FONT for SCRIPT-OR-FACE."
(if (stringp font)
`(:family ,font)
(apply
#'append
(mapcar (lambda (a) (list a (plist-get font a)))
(cl-intersection (+plist-keys font)
(if (memq script-or-face +known-scripts)
+font-spec-keywords
+face-attributes))))))
(cl-intersection
(+plist-keys font)
(if (memq script-or-face +known-scripts) +font-spec-keywords +face-attributes))))))

(defun +font-installed-p (font-family)
"Check if FONT-FAMILY is installed on the system."
Expand Down

0 comments on commit 8c3cb2c

Please sign in to comment.