Emoji / Unicode are not rendered correctly, regardless of font (incorrect width)
Before opening this issue, I did find this related issue: gnome-terminal#152 (closed)
I initially reported this over here: https://askubuntu.com/questions/1351278/unicode-characters-do-not-have-correct-width-in-the-terminal?noredirect=1#comment2457261_1351278
And then reported here: https://gitlab.freedesktop.org/cairo/cairo/-/issues/573#note_1423619
Text copied here: -------------------------_
This doesn't happen with all unicode characters, but does happen with scissors:
neovim: scissors overlap the next character in neovim
vscode: uses a different character / emoji set, but it looks like vscode renders differently, as there is no overlap
gedit: renders as I'd expect: no overlap
terminal: has the same problem as in neovim
GitHub in Firefox looks correct
Is there a way to configure the terminal to have consistent emoji/unicode width/rendering?
One of the commenters, Raffa, pointed me at Cairo.
I'm using gnome-terminal.
Version info:
❯ gnome-terminal --version
# GNOME Terminal 3.44.0 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD
❯ dpkg -l | grep cairo
ii gtk2-engines-murrine:amd64 0.98.2-3build2 amd64 cairo-based gtk+-2.0 theme engine
ii libcairo-gobject-perl:amd64 1.005-3build1 amd64 integrate Cairo into the Glib type system in Perl
ii libcairo-gobject2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library (GObject library)
ii libcairo-perl:amd64 1.109-2build1 amd64 Perl interface to the Cairo graphics library
ii libcairo-script-interpreter2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library (script interpreter)
ii libcairo2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library
ii libcairomm-1.0-1v5:amd64 1.12.2-4build3 amd64 C++ wrappers for Cairo (shared libraries)
ii libdecor-0-plugin-1-cairo:amd64 0.1.0-3build1 amd64 default decoration plugin
ii libpangocairo-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
ii libpixman-1-0:amd64 0.40.0-1build4 amd64 pixel-manipulation library for X and cairo
ii python3-cairo:amd64 1.20.1-3build1 amd64 Python3 bindings for the Cairo vector graphics library
ii python3-gi-cairo 3.42.0-3build1 amd64 Python 3 Cairo bindings for the GObject library
❯ dpkg -l | grep gnome-terminal
ii gnome-terminal 3.44.0-1ubuntu1 amd64 GNOME terminal emulator application
ii gnome-terminal-data 3.44.0-1ubuntu1 all Data files for the GNOME terminal emulator
ii nautilus-extension-gnome-terminal 3.44.0-1ubuntu1 amd64 GNOME terminal emulator application - Nautilus extension
❯ dpkg -l | grep pango
ii gir1.2-pango-1.0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text - gir bindings
ii libcogl-pango20:amd64 1.22.8-3build1 amd64 Object oriented GL/GLES Abstraction/Utility Layer
ii libpango-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
ii libpangocairo-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
ii libpangoft2-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
ii libpangomm-1.4-1v5:amd64 2.46.2-1 amd64 C++ Wrapper for pango (shared libraries)
ii libpangoxft-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy