Live data from Hacker News

Terminal Support for Emoji

darrenburns.net

71–80 of 129 posts

Re: Terminal Support for Emoji

#71
post #27

Earlier quoted context omitted.

> How do you scribble "family of three: mom, father, daughter" without any emojis You don't. You use text.

I still was trying to figure out how an emoji represents a family.

With the scheme demonstrated at the beginning of the article.

  1F468 man
   200D zero width joiner
  1F469 woman
   200D zero width joiner
  1F467 girl

Re: Terminal Support for Emoji

#72
post #18

I don't know of a single terminal that actually gets these ZWJ emoji sequences right. There are several terminals who will render them, but I haven't seen any actually get the width calculations correct. (E.g., https://github.com/kovidgoyal/kitty/issues/3810 .) Part of the problem is that it really messes up the idea of a rectangular grid of base characters in memory, so you'll need some sort of indirection. Obviousl…

Have you checked mlterm? Its supported for other otherwise-neglected encodings and fonts is otherwise unparalleled AFAIK.

https://wiki.archlinux.org/title/Mlterm

Re: Terminal Support for Emoji

#73
I spent quite a bit of time coming up with an algorithm that gives me the correct width for any Unicode character, including emojis [1]. The reality is much more complicated than what wcwidth does and using the East Asian Width attribute will give wrong results, as outlined in the article.

Unfortunately, since a lot of terminals simply use wcwidth, you often have to use that same flawed algorithm in your application to make it work in those terminals.

[1] https://pkg.go.dev/github.com/rivo/uniseg#hdr-Monospace_Widt...

Re: Terminal Support for Emoji

#74
I'm on the VS Code team and maintain xterm.js which is what Hyper's frontend is based on. There are actually multiple developments happening in this area.

First, there's a contribution from the author of DomTerm which adds grapheme cluster support to xterm.js, which will correctly merge and size things like emoji that are called out in the post. This is currently based on Unicode 15. See https://github.com/xtermjs/xterm.js/pull/4519

Second, while Windows Terminal does seem to work with emoji sometimes, it doesn't all the time. I'm not 100% sure, but I think it may only work on Windows ptys, not in WSL for example. Last time I spoke with the team they said they're working on a rewrite which could lead to proper emoji support.

Re: Terminal Support for Emoji

#75
post #68

Earlier quoted context omitted.

Unicode needed to include written-on-paper glyphs that existed in the world. That makes sense to most people. But a lot, lot, lot of communication these days happen digitally (digital first). You can't scribble things as freely in a textbox like this one. You can certainly make suggestive combinations like `:)`, but you are pretty limited. (How do you scribble "family of three: mom, father, daughter" without any emoj…

> Unicode needed to include written-on-paper glyphs that existed in the world. If it was the case, Emoji is seriously lacking a penis. I mean, seriously, give men a way to draw and this is what you will get. There are already existing "subjective combinations" like 8===D and the eggplant emoji for which it is its most common use. There is a proper penis in the hieroglyphics, but just because there is a hieroglyphic d…

Unicode actually does include a penis: 𓂸

There is even a "phallus with emission" variant.

Re: Terminal Support for Emoji

#76
post #27

Earlier quoted context omitted.

> How do you scribble "family of three: mom, father, daughter" without any emojis You don't. You use text.

I still was trying to figure out how an emoji represents a family.

You use the pregnant man emoji, which represents mother, father and child together as one.

Re: Terminal Support for Emoji

#77
post #65
post #6

I never have understood the push to emojify everything. But commit messages, options in menus, status outputs, you name it: I think we'd be better off leaving it in plain ASCII (or Unicode if your language needs that, just as long as you don't dip into the emoji). Emoji are quite nice for messaging people and occasionally some of the more generic ones can be useful for status indicators (think the red and green circl…

I quite like them in GitHub release descriptions, e.g. those by Ghost CMS https://github.com/TryGhost/Ghost/releases/tag/v5.52.0

That’s a particularly confusing example as only 3 are actually emoji and the other 7 are inline images.

Re: Terminal Support for Emoji

#78
post #2

It still pains me that Unicode decided to get in the business of curating an ever-growing clip art collection. It’s like the Oxford English Dictionary decided that they’re actually poets; their main job is suddenly to invent brand new words that let people write with an exciting level of density and poetic license; and those new dictionary words would also be multi-color because everybody owns a pack of colored penci…

[dead]

Re: Terminal Support for Emoji

#79
post #31
post #2

It still pains me that Unicode decided to get in the business of curating an ever-growing clip art collection. It’s like the Oxford English Dictionary decided that they’re actually poets; their main job is suddenly to invent brand new words that let people write with an exciting level of density and poetic license; and those new dictionary words would also be multi-color because everybody owns a pack of colored penci…

My main problem with emoji is that they look different everywhere. For example "big grin" looks like that on native Android, but looks like an angry face on other platforms. Quite a difference in meaning. Another problem is that some emojis are horribly missing. For example during COVID it would have been nice to have a cotton swab thing. :face-palm:

> For example during COVID it would have been nice to have a cotton swab thing

Why? It would be next to meaningless now but have to be supported forever. This actually exemplifies why they need to be more strict about what goes in.

Re: Terminal Support for Emoji

#80
post #74

I'm on the VS Code team and maintain xterm.js which is what Hyper's frontend is based on. There are actually multiple developments happening in this area. First, there's a contribution from the author of DomTerm which adds grapheme cluster support to xterm.js, which will correctly merge and size things like emoji that are called out in the post. This is currently based on Unicode 15. See https://github.com/xtermjs/xt…

I spent a lot of time on this topic (see https://news.ycombinator.com/item?id=37048434). Feel free to get in touch and discuss. I'm happy to help.
Post reply on HN