Function: doom-modeline-string-pixel-width
doom-modeline-string-pixel-width is a natively compiled function
defined in doom-modeline-core.el.
Signature
(doom-modeline-string-pixel-width STR)
Documentation
Return the width of STR in pixels.
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-string-pixel-width (str)
"Return the width of STR in pixels."
(if (fboundp 'string-pixel-width)
(string-pixel-width str)
(* (string-width str) (window-font-width nil 'mode-line)
(if (display-graphic-p) 1.05 1.0))))