Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with file-icons #326

Open
derinsh0 opened this issue Jul 26, 2022 · 2 comments
Open

Issue with file-icons #326

derinsh0 opened this issue Jul 26, 2022 · 2 comments

Comments

@derinsh0
Copy link
Contributor

For some reason, file-icons font will not show sometimes. xE296 is the icon for emacs. In emacs-lisp-mode it will show up fine. In spacemacs home-buffer it will not. In apropos and some assorted help buffers it will not.

There are two emacs icons for some reason, one called "elisp" the other "emacs" with identical hex. When doing describe-char on either of them, on the second line the first character is unrendered but the character in (displayed as ..) is visible.


             position: 10481 of 14343 (73%), column: 0
             character:  (displayed as ) (codepoint 59686, #o164446, #xe926)
             charset: unicode (Unicode (ISO10646))
             code point in charset: 0xE926
             syntax: w 	which means: word
             category: L:Strong L2R
             to input: type "C-x 8 RET e926"
          buffer code: #xEE #xA4 #xA6
            file code: #xEE #xA4 #xA6 (encoded by coding system utf-8)
              display: by this font (glyph code):
    harfbuzz:-outline-file-icons-regular-normal-normal-*-41-*-*-*-p-*-iso8859-1 (#xA3)

Character code properties: customize what to show
  general-category: Co (Other, Private Use)
  decomposition: (59686) ('')

There are text properties here:
  display              (raise -0.24)
  font-lock-face       (:family "file-icons" :height 2.4)
  fontified            t
  rear-nonsticky       t

In ielm, (all-the-icons-insert-icons-for 'fileicon) will give you a list of working icons in your input field, but when you send it for evaluation the printed list has many non-working icons.

all-the-icons-icon-for-file and all-the-icons-icon-for-mode will return unrendered icons as well in the minibuffer or ielm.

I have taken screenshots of ielm, first as input to repl, then as a returned output.

input
output

@derinsh0
Copy link
Contributor Author

Okay I have realized the problem (partly).

The issue is that all-the-icons assigns the file-icon xE296 to the buffer, but not the font-family. Running (all-the-icons-icon-family-for-mode major-mode) gives nil in spacemacs-buffer, even though it will try to give you the icon when you run "icon-for-mode".

I manually added spacemacs-buffer-mode to all-the-icons-mode-icon-alist in all-the-icons.el and the icon is showing.

But I consider this a bug. If all-the-icons insists on a file icon, it should also insist on the file-icons font.

@wyuenho
Copy link
Collaborator

wyuenho commented Sep 1, 2022

Sounds good, care to open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants