The Problem

st crashes whenever an emoji needs to be rendered.

It turns out to be an issue with the underlying font rendering library libXft.

libXft is the client side font rendering library, using libfreetype, libX11, and the X Render extension to display anti-aliased text.

The Solution

In its current offical mainline form libXft does not support rendering images.

A patch by Maxime Coste exists to add support for BGRA glyphs and scaling, effectively enabling emoji rendering support.

I discovered the Arch AUR has packaged up this patch nicely, and its PKGCONFIG provides the treasure map to patching libXft.

pkgdesc="libXft with BGRA glyph (color emoji) rendering & scaling patches by Maxime Coste"
depends=('fontconfig' 'libxrender' 'curl' 'xorg-util-macros')
makedepends=('git' 'pkgconf')
source=("git+$url" "")
md5sums=('SKIP' 'SKIP')

build() {
    cd libxft
    patch -p1 < ../1.patch
    sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man

package() {
    cd libxft
    make DESTDIR="${pkgdir}" install
    install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
    install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"

Running on a Debian machine, needed to tweak some of the steps, here’s a snippet of my bash history:

curl -L -o 1.patch
git clone
cd libxft
patch -p1 < ../1.patch
sudo apt install xutils-dev libtool
sudo sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
sudo make install
cd /usr/lib/x86_64-linux-gnu
sudo rm -f libXft.*
sudo ln -s /usr/lib/libXft.a libXft.a
sudo ln -s /usr/lib/
sudo ln -s /usr/lib/
sudo ln -s /usr/lib/
sudo ldconfig

Restart st and attempt to render something with emojis, I had some emails in neomutt with emojis in their subject lines which was crashing st:

neomutt running in st with the libxft-bgra patch