You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The special charecters in the track and artist names causes some rendering issues when hovering over the artist name in the library view. I'm using Bash 5.0.17(1)-release on the Gnome terminal
I think the problem here is that the smiley takes up two characters instead of one, which probably has to do with the font used. I'm not sure cmus can do much about that.
I've seen this too, and I suspect it's something to do with the individual character width vs the combined character width, or that it's due to character width differences between Unicode versions (but I'd have to do some research about this, since I'm not completely familiar with it). It's also possible it's a terminal emulator or font issue, but that's less likely since this has happened on every one I use regularly. I'll have to play around with it a bit and do some research when I have time (I might spend a few minutes soon, but I won't be able to do anything major until I have more time).
Not sure, is it better to create new bug, as I got problem trying to use emojis in status, also experiencing problems with width. For now I tried two chars:
U+1F50A SPEAKER WITH THREE SOUND WAVES: instead of "vol:" in status (works fine in term title, though it doesn't update for anything but audiofile change): {?volume>=0?🔊%{?lvolume!=rvolume?%{lvolume},%{rvolume}?%{volume}}}%%%
This did not cause any visible size issues, but repeat char 🔁 (U+1F501) ate some space (insead of R in status end).
First - it refused to appear on its own. Second char after it (e.g. space) made it to appear, though if this char is printable, it doesn't appear itself. Anyway, result is a bit wider and sometimes status line is wrapped. Working part from status line: %1{?repeat="R"?🔁 }
The problem is basically that the code has an extremely simplistic and limited awareness of unicode and which characters are wide or narrow. If we want to properly support everything we should find a library.
In the meantime I propose some simple changes in #1151 that mask the issue for the most part. To be clear, it won't fix every character.
Activity
jcpst commentedon Mar 31, 2021
I'd like to report that I'm experiencing this same issue (rather than create a duplicate).
Without emoji
With emoji
uname -a:cmus --version:cmus --plugins:nefthy commentedon Mar 31, 2021
could you post the output of
id3info your.mp3for the mp3 with the smiley?jcpst commentedon Apr 1, 2021
nefthy commentedon Apr 1, 2021
I think the problem here is that the smiley takes up two characters instead of one, which probably has to do with the font used. I'm not sure cmus can do much about that.
@pgaskin any ideas?
nefthy commentedon Apr 1, 2021
id3info does not work for m4a files.
exiftool -a file.m4amight do the trick.pgaskin commentedon Apr 1, 2021
I've seen this too, and I suspect it's something to do with the individual character width vs the combined character width, or that it's due to character width differences between Unicode versions (but I'd have to do some research about this, since I'm not completely familiar with it). It's also possible it's a terminal emulator or font issue, but that's less likely since this has happened on every one I use regularly. I'll have to play around with it a bit and do some research when I have time (I might spend a few minutes soon, but I won't be able to do anything major until I have more time).
jcpst commentedon Apr 1, 2021
Thanks for the discussion and following up so far. Been a fan of this player for years 😃. Here's the result of running
exiftool.pgaskin commentedon Apr 1, 2021
I believe this is probably an issue with cmus' calculations (and partly caused by terminal emulators), but I'll need to do some testing to be sure.
Some helpful things I found:
nick87720z commentedon Dec 30, 2021
Not sure, is it better to create new bug, as I got problem trying to use emojis in status, also experiencing problems with width. For now I tried two chars:
{?volume>=0?🔊%{?lvolume!=rvolume?%{lvolume},%{rvolume}?%{volume}}}%%%This did not cause any visible size issues, but repeat char 🔁 (U+1F501) ate some space (insead of R in status end).
First - it refused to appear on its own. Second char after it (e.g. space) made it to appear, though if this char is printable, it doesn't appear itself. Anyway, result is a bit wider and sometimes status line is wrapped. Working part from status line:
%1{?repeat="R"?🔁 }Assume unknown characters are narrow rather than zero-width
Treat most emoji as wide characters
Assume unknown characters are narrow rather than zero-width
Treat most emoji as wide characters
gavtroy commentedon Dec 31, 2021
The problem is basically that the code has an extremely simplistic and limited awareness of unicode and which characters are wide or narrow. If we want to properly support everything we should find a library.
In the meantime I propose some simple changes in #1151 that mask the issue for the most part. To be clear, it won't fix every character.
gavtroy commentedon Dec 31, 2021
For testing and reference, attaching a metadata-only version of the T€∆M M£K4NØ album demoed in the first post; emoji_zalgo_test_album.tar.gz
Grow gbufs correctly when encountering zero-width characters
Assume unknown characters are narrow rather than zero-width
Treat most emoji as wide characters
gavtroy commentedon May 22, 2022
The latest proposed fix for this issue is #1198.