Displaying Emoji in terminal?

284 views
Skip to first unread message

f...@fortes.com

unread,
Nov 16, 2016, 10:43:54 AM11/16/16
to chromium-hterm
First, thank you very much for this app, without it I would never be able to use a Chromebook as my main machine.

I'm wondering if there is any configuration that makes it possible to correctly display emoji within the terminal. For example, the Yarn tool ( https://yarnpkg.com/ ) uses emoji all over the place, but these never display correctly in hterm. Copying and pasting emoji into the terminal also fails. Both of these work when using iTerm.

I know Hyper uses hterm under the covers, and this PR seems to be trying to address some of the issues ( https://github.com/zeit/hyper/pull/740 ) -- but I was wondering if there is any configuration I can change on my side in order to get emoji support.

Thanks!

Mike Frysinger

unread,
Nov 17, 2016, 5:07:18 PM11/17/16
to f...@fortes.com, chromium-hterm
what exactly do you mean ?  emoji are simply distinct unicode codepoints, and the rendering of them is controlled by the active font.  if you find a particular character being displayed as tofu (� or something like █), then try a different font.

if you mean you want hterm to render emoji as images instead of characters, then it's pretty unlikely that'll ever happen.

if you mean something else, please clarify.
-mike

--
You received this message because you are subscribed to the Google Groups "chromium-hterm" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-hterm/91f66f2a-7f79-4aa9-a7b0-862c8cc60331%40chromium.org.

Robert Ginda

unread,
Nov 17, 2016, 5:56:59 PM11/17/16
to Mike Frysinger, f...@fortes.com, chromium-hterm
Given the correct font, hterm will render emoji as emoji.  Based on the comments in the github PR, it seems like the main problem is constraining the width of an emoji so it doesn't disturb the position of the rest of the characters in the row or the cursor position.  They seem to have a decent approach, but have decided to monkeypatch hterm instead of upstreaming their change.

There's no configuration option that will make existing hterm render these characters correctly.  The right approach would be to getting the hyperterm folks to fix the underlying problem in upstream hterm.


Rob.


f...@fortes.com

unread,
Nov 18, 2016, 10:42:17 AM11/18/16
to chromium-hterm, vap...@chromium.org, f...@fortes.com
In my case, the Emoji show up as tofu or sometimes just don't print anything at all. Copy and pasting the following emoji (generated via ChromeOS on screen keyboard): 🔧 -- I get the following displayed: https://i.imgur.com/1KsgFhM.png

I had never tried before, but if I copy two sequentially (🏠🐈) -- the first emoji now displays, but it goes to tofu if I type another character: https://i.imgur.com/6aPBnxQ.png

Trying several characters (🏠🐈👟😦🔝🔧) -- I get the following displayed: https://i.imgur.com/kU8I1lM.png -- the first three emoji come through, but there is weird behavior when typing after (or even control-c).

Via the inspector, I changed the font-family to `Serif`, but the same thing still happens.

Thanks for chiming in on the hyperterm thread, would be fantastic to get a shared effort here.
Reply all
Reply to author
Forward
0 new messages