Function: doom-modeline-propertize-icon
doom-modeline-propertize-icon is a natively compiled function defined
in doom-modeline-core.el.
Signature
(doom-modeline-propertize-icon ICON &optional FACE)
Documentation
Propertize the ICON with the specified FACE.
The face should be the first attribute, or the font family may be overridden.
So convert the face ":family XXX :height XXX :inherit XXX" to
":inherit XXX :family XXX :height XXX".
See https://github.com/seagle0128/doom-modeline/issues/301.
Source Code
;; Defined in /nix/store/1lcicrdd2r4b8rkc91nnn74ymk1jl6yd-emacs-packages-deps/share/emacs/site-lisp/elpa/doom-modeline-20260928.1632/doom-modeline-core.el
(defun doom-modeline-propertize-icon (icon &optional face)
"Propertize the ICON with the specified FACE.
The face should be the first attribute, or the font family may be overridden.
So convert the face \":family XXX :height XXX :inherit XXX\" to
\":inherit XXX :family XXX :height XXX\".
See https://github.com/seagle0128/doom-modeline/issues/301."
(if doom-modeline-icon
(when-let* ((props (get-text-property 0 'face icon)))
(when (listp props)
(cl-destructuring-bind (&key family height inherit &allow-other-keys) props
(propertize icon 'face `(:inherit (doom-modeline ,(or face inherit props))
:family ,(or family "")
:height ,(or height 1.0))))))
(doom-modeline-propertize-text icon face)))