matterhorn-chat / matterhorn

A feature-rich Unix terminal client for the Mattermost chat system
BSD 3-Clause "New" or "Revised" License
1.02k stars 75 forks source link

Emoji not rendering using :emoji: #834

Closed fictitiousexistence closed 1 week ago

fictitiousexistence commented 1 week ago

Hello. Are emojis supposed to actually show when using :emojiname: ? I have emoji.json located at .config/matterhorn/emoji.json and my terminal and font support emojis.

When I type :tab I see the list of emojis as :emojiname:

I can see emojis if I copy paste them directly. Example, if I go to https://www.compart.com/en/unicode/U+1F525 and just copy paste the emoji icon it shows.

If I type ":fire:" or use :tab and select ":fire:" or get a incoming message via a webhook+curl using ":fire:" it just shows the text ":fire:"

mattermost-emojis

Is this how it is meant to work or am I doing something wrong?

Thanks!

matterhorn version: matterhorn-90000.0.0-ubuntu-22.04-jammy-x86_64.tar.bz2 binary OS: gentoo

jtdaugherty commented 1 week ago

Hi,

Are emojis supposed to actually show when using :emojiname: ?

No, Matterhorn does not translate from the text version of an emoji to its graphical representation, partly because Unicode emoji are often not supported fully and also because some (custom) emoji on the server are graphics rather than Unicode and can't be rendered in the terminal at all.

I have emoji.json located at .config/matterhorn/emoji.json and my terminal and font support emojis.

Even so, Unicode emojis are not widely supported in terminals because they are often rendered with the incorrect width, which breaks UI layout. The UI framework that matterhorn is built with also has trouble with many (particularly multi-code point) glyphs.