eldoc-box icon indicating copy to clipboard operation
eldoc-box copied to clipboard

Font not available `(:name . "default")`

Open alexispurslane opened this issue 1 year ago • 1 comments

Recently updated to the latest version of eldoc-box, and now I'm getting this error whenever it's about to pop up if I use a variable pitch font with it:

My config:

(use-package eldoc-box
        :config
        (set-face-attribute 'eldoc-box-body nil :inherit 'variable-pitch)
        (set-face-foreground 'border (face-background 'mode-line))
        :hook (eldoc-mode . eldoc-box-hover-at-point-mode))

Error:

Debugger entered--Lisp error: (error "Font not available" #<font-spec nil nil default nil nil nil nil nil nil nil nil nil ((:name . "default") (:user-spec . "default"))>)
  set-face-attribute(dictionary-word-definition-face #<frame emacs@fedora 0x559451ec8da8> :font "default")
  face-spec-set-2(dictionary-word-definition-face #<frame emacs@fedora 0x559451ec8da8> (:font "default"))
  face-spec-recalc(dictionary-word-definition-face #<frame emacs@fedora 0x559451ec8da8>)
  x-create-frame-with-faces(((client . #<process server <1>>) (foreground-color . "#c2c2c2") (background-color . "#060606") (right-divider-width . 1) (left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10) (parent-frame . #<frame init.el 0x559436cc7420>)))
  #f(compiled-function (params) #<bytecode -0x1d5fe84c86b18cd1>)(((client . #<process server <1>>) (foreground-color . "#c2c2c2") (background-color . "#060606") (right-divider-width . 1) (left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10) (parent-frame . #<frame init.el 0x559436cc7420>)))
  apply(#f(compiled-function (params) #<bytecode -0x1d5fe84c86b18cd1>) ((client . #<process server <1>>) (foreground-color . "#c2c2c2") (background-color . "#060606") (right-divider-width . 1) (left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10) (parent-frame . #<frame init.el 0x559436cc7420>)))
  frame-creation-function(((client . #<process server <1>>) (foreground-color . "#c2c2c2") (background-color . "#060606") (right-divider-width . 1) (left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10) (parent-frame . #<frame init.el 0x559436cc7420>)))
  make-frame(((left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10) (parent-frame . #<frame init.el 0x559436cc7420>)))
  display-buffer-in-child-frame(#<buffer  *eldoc-box*> ((child-frame-parameters (left . -1) (top . -1) (width . 0) (height . 0) (no-accept-focus . t) (no-focus-on-map . t) (min-width . 0) (min-height . 0) (internal-border-width . 1) (vertical-scroll-bars) (horizontal-scroll-bars) (right-fringe . 3) (left-fringe . 3) (menu-bar-lines . 0) (tool-bar-lines . 0) (line-spacing . 0) (unsplittable . t) (undecorated . t) (visibility) (mouse-wheel-frame) (no-other-frame . t) (cursor-type) (inhibit-double-buffering . t) (drag-internal-border . t) (no-special-glyphs . t) (desktop-dont-save . t) (tab-bar-lines . 0) (tab-bar-lines-keep-state . 1) (default-minibuffer-frame . #<frame init.el 0x559436cc7420>) (minibuffer . #<window 4 on  *Minibuf-0*>) (left-fringe . 10))))
  eldoc-box--get-frame(#<buffer  *eldoc-box*>)
  eldoc-box--display(#("set-face-attribute: (FACE FRAME &rest ARGS)" 0 18 (face font-lock-function-name-face) 38 42 (face eldoc-highlight-function-argument)))
  eldoc-box--eldoc-message-function("%s" #("set-face-attribute: (FACE FRAME &rest ARGS)" 0 18 (face font-lock-function-name-face) 38 42 (face eldoc-highlight-function-argument)))
  eldoc-box--eldoc-display-function(((#("(FACE FRAME &rest ARGS)" 18 22 (face eldoc-highlight-function-argument)) :thing set-face-attribute :face font-lock-function-name-face)) nil)
  run-hook-with-args(eldoc-box--eldoc-display-function ((#("(FACE FRAME &rest ARGS)" 18 22 (face eldoc-highlight-function-argument)) :thing set-face-attribute :face font-lock-function-name-face)) nil)
  #f(compiled-function () #<bytecode 0x1d729591c276c16>)()
  #f(compiled-function (string &rest plist) #<bytecode 0x138508dae21649a6>)(#("(FACE FRAME &rest ARGS)" 18 22 (face eldoc-highlight-function-argument)) :thing set-face-attribute :face font-lock-function-name-face)
  elisp-eldoc-funcall(#f(compiled-function (string &rest plist) #<bytecode 0x138508dae21649a6>))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12>()
  apply(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> nil)
  timer-event-handler([t 0 1 0 t #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_12> nil idle 0 nil])

alexispurslane avatar Dec 05 '24 22:12 alexispurslane

The error says dictionary-word-definition-face is configured to use a font that's not available on the system. Can you check what's the font you set for it? Just M-x list-faces-display RET, and search for dictionary-word-definition-face, click it, and check the face attributes for it.

casouri avatar Dec 05 '24 22:12 casouri