rainstormstudio / nerd-icons.el

GNU General Public License v3.0
206 stars 22 forks source link

Incorrect icons displayed in tab-bar with nerd-Icons in Emacs #60

Closed LuciusChen closed 8 months ago

LuciusChen commented 8 months ago

I am encountering a peculiar issue while working with icons in Emacs using the Nerd-Icons package. When I directly use (insert (nerd-icons-sucicon "nf-custom-emacs")) to insert icons, they display correctly. However, when I configure my setup to use (nerd-icons-sucicon "nf-custom-emacs"), the icons do not display as expected.

image
(defun tab-bar-format-menu-bar ()
  "Produce the Menu button for the tab bar that shows the menu bar."
  `((menu-bar menu-item (propertize (concat " " (nerd-icons-sucicon "nf-custom-emacs") " ") 'face 'tab-bar-tab)
              tab-bar-menu-bar :help "Menu Bar")))

Environment:

Emacs version: GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.6 (Build 22G120)) of 2023-10-06 Operating System: MacOS Ventura 13.6

seagle0128 commented 8 months ago

Can you try this snippet?

(defun tab-bar-format-menu-bar ()
  "Produce the Menu button for the tab bar that shows the menu bar."
  `((menu-bar menu-item (concat " " (nerd-icons-sucicon "nf-custom-emacs") " ")
              tab-bar-menu-bar :help "Menu Bar")))

Or try M-x nerd-icons-insert RET nf-custom--emacs RET?

LuciusChen commented 8 months ago

It works