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

nerd-icons-faicon doesn't work with concat in MS Windows Emacs #85

Open
AnweshGangula opened this issue Jun 25, 2024 · 4 comments
Open

Comments

@AnweshGangula
Copy link

I'm using the below command to create a string with color-pallete icon which I want to use along with colorful-mode. But I'm not able to use the nerd-icons-faicon function with concat. It works fine with the insert function but not with concat.

I posted about this in colorful-mode as well - which you can find here more details.

But as mentioned in the issue mentioned above:

Problem

I can see that when I execute this command (C-c C-c) with insert I get the icon properly, but when I execute with concat the result is not rendered properly

using result

(insert (nerd-icons-faicon "nf-fae-palette_color") " ")

result command output

using concat

(concat (nerd-icons-faicon "nf-fae-palette_color") " ")

concat result

Additional details

I also asked for what the issue could be in this superuser post and found that the box that is currently being rendered with concat is in the Private Use Area. Does this mean this particular icon needs a specific font family?

@seagle0128
Copy link
Collaborator

seagle0128 commented Jun 26, 2024

Interesting!
If you use describe-char to check, you will find out no font specified on Windows, so the icons are unable to display correctly. Actually (insert (concat (nerd-icons-faicon "nf-fae-palette_color") " ")) will display the icons.

@AnweshGangula
Copy link
Author

Yeah, this is working fine when I use insert, But I need to be able to se concat so that I can call (setq colorful-prefix-string (concat (nerd-icons-faicon "nf-fae-palette_color") " ")) in my init file to customize the colorful-mode face-attribute.

@dr-scsi
Copy link
Contributor

dr-scsi commented Jun 30, 2024

@AnweshGangula - Maybe I'm missing the point, but this is what I get on Windows:
nerd

This is with Emacs 30.0.50 (cb67c34bcf) built with MSYS2/MinGW.

@AnweshGangula
Copy link
Author

@dr-scsi, yes it's working fine when I use insert, but if I use just cocat without insert in a codeblock and execute it, I don't see the icon (as mentioned this screenshot above

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

3 participants