tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
962 stars 42 forks source link

Nerd Font Icons doesn't work properly in Kitty terminal(?) #327

Closed Opposite34 closed 1 month ago

Opposite34 commented 1 month ago

I am currently setting up an Arch system and decided on using termusic for my music player. I have installed ttf-nerd-fonts-symbols to work with my font (Fira Code) as Kitty itself doesn't like when you patch the font directly.

Note that I have tried doing the alternative by using the patched fonts provided by this AUR repo instead, but neither rendered the icons in termusic properly.

However, the nerd font icons rendered fine in other TUIs. Please see attached image below where I have the GitHub icon (\uf09b) and two shuffles (\uf074 and \udb81\udc9f) rendered properly in the Kitty terminal (top left) and neovim (bottom left), while the termusic shuffle / sequential playback mode doesn't work. Also of note that the song I am currently hovering over in the playlist uses emojis, of which it doesn't appear to render as well.

nerdfont_termusic_problem

Some system and version info (in case it is important): termusic version: 0.9.0-1 (via AUR) OS: Arch WM: Hyprland (Wayland)

I would like either a fallback in case Nerd Font breaks (since I can't really see if I'm on shuffle or sequential playback mode) or some fix to this behavior. (EDITED: I have just seen the display symbol toggle in settings. However, this is still quite a weird behavior worthing a report in my opinion.)

hasezoey commented 1 month ago

termusic version: 0.9.0-1 (via AUR)

please use termusic --version, my best guess is AUR termusic?

maybe consider trying the latest master, or AUR termusic-git (though there have been no known font related updates)


the symbols render fine for me (KDE Konsole 24.05.0 + Hack Nerd Font; the same for alacritty 0.13.2), i am not aware of anything we can do to detect if a font display is broken or not.

just to be sure, did you already try restarting your kitty terminal for termusic (or your whole system)?

Opposite34 commented 1 month ago

termusic version: 0.9.0-1 (via AUR)

please use termusic --version, my best guess is AUR termusic?

this shows Termusic d102a05[g]

just to be sure, did you already try restarting your kitty terminal for termusic (or your whole system)?

Yep I did, and it still produce the same result. However, I found out that it seems like some other icons on an unrelated TUI doesn't work as well. If possible can you give me specifically the unicodes for the icons? Just a sanity check in case it is actually on the Nerd Font's part not having everything.

hasezoey commented 1 month ago

If possible can you give me specifically the unicodes for the icons?

https://github.com/tramhao/termusic/blob/f4114102cbb94f28d6357aaedf96db408488f7af/lib/src/config/v1/mod.rs#L75-L77

the missing icons from the track you would need to LS yourself

Opposite34 commented 1 month ago

Oh my god... I just realized these are not Nerd Fonts... they are literal emojis icons.... Installing Noto Fonts fixed my problem.

Thank you very much for helping me work out the issue.