Open bersLucas opened 3 years ago
I'd like to report that I'm experiencing this same issue (rather than create a duplicate).
Without emoji
With emoji
1) uname -a
:
Darwin KCMACLT1 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
2) cmus --version
:
cmus v2.9.1
Copyright 2004-2006 Timo Hirvonen
Copyright 2008-2016 Various Authors
3) cmus --plugins
:
Input Plugins: /usr/local/Cellar/cmus/2.9.1/lib/cmus/ip
mad:
Priority: 55
File Types: mp3 mp2
MIME Types: audio/mpeg audio/x-mp3 audio/x-mpeg
opus:
Priority: 50
File Types: opus
MIME Types:
wav:
Priority: 50
File Types: wav
MIME Types:
mp4:
Priority: 50
File Types: mp4 m4a m4b
MIME Types:
cue:
Priority: 50
File Types:
MIME Types: application/x-cue
aac:
Priority: 50
File Types: aac
MIME Types: audio/aac audio/aacp
flac:
Priority: 50
File Types: flac fla
MIME Types:
vorbis:
Priority: 50
File Types: ogg oga ogx
MIME Types: application/ogg audio/x-ogg
ffmpeg:
Priority: 30
File Types: aa aac ac3 aif aifc aiff ape au fla flac m4a m4b mka mkv mp+ mp2 mp3 mp4 mpc mpp ogg opus shn tak tta wav webm wma wv
MIME Types:
Output Plugins: /usr/local/Cellar/cmus/2.9.1/lib/cmus/op
coreaudio
could you post the output of id3info your.mp3
for the mp3 with the smiley?
*** Tag information for JPEGMAFIA - Veteran - 11 😱.m4a
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?
*** Tag information for JPEGMAFIA - Veteran - 11 😱.m4a
id3info does not work for m4a files. exiftool -a file.m4a
might do the trick.
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).
Thanks for the discussion and following up so far. Been a fan of this player for years 😃. Here's the result of running exiftool
.
❯ exiftool -a JPEGMAFIA\ -\ Veteran\ -\ 11\ 😱.m4a
ExifTool Version Number : 12.16
File Name : JPEGMAFIA - Veteran - 11 😱.m4a
Directory : .
File Size : 3.2 MiB
File Modification Date/Time : 2021:04:01 13:37:37-05:00
File Access Date/Time : 2021:04:01 13:37:37-05:00
File Inode Change Date/Time : 2021:04:01 13:37:37-05:00
File Permissions : rw-------
File Type : MP3
File Type Extension : mp3
MIME Type : audio/mpeg
ID3 Size : 128
Title :
Artist :
Album :
Year :
Comment :
Genre : None
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:
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"?🔁 }
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.
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
The latest proposed fix for this issue is #1198.
Have this issue in 2.10.0
Fixed by using latest commit.
1)
uname -a
:2)
cmus --version
:3)
cmus --plugins
:Given the following album: https://dismissyourself.bandcamp.com/album/000-deluxe-edition
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