emacs/var/elfeed/db/data/3b/3bdef9554b37c0de2989e88cf3d0d2911a4efcf7
2022-01-03 12:49:32 -06:00

54 lines
1.8 KiB
Plaintext

<p>The scenario: you are on Debian (or derivatives) and are using the
Simple Terminal by the upstream suckless source or community repos such
as my <a href="https://gitlab.com/protesilaos/st">soft fork of ST</a>.</p>
<p>The problem: when ST tries to draw symbolic Unicode points—emoji—it
throws an error and quits. This can happen quite often when using TUIs
such as <code>neomutt</code> and <code>newsboat</code>: you might get updates that include
such symbols in their title string. I have also seen Git repos where
people use emoji in their commit messages…</p>
<p>The solution:</p>
<pre><code>sudo apt install fonts-symbola
</code></pre>
<p>Everything will then work as intended. Just confirmed as much on
a machine running Debian Buster/Sid.</p>
<h2>Not needed for graphical applications</h2>
<p>To get emoji support on GUIs, I rely on another typeface altogether:</p>
<pre><code>sudo apt install fonts-noto-color-emoji
</code></pre>
<p>Then I use the appropriate rules in my fontconfig. The following is
just a sample <code>fonts.conf</code>. For the fully fledged implementation, refer
to <a href="https://gitlab.com/protesilaos/dotfiles">my dotfiles</a>:</p>
<pre><code>&lt;fontconfig&gt;
&lt;!-- If the requested font is sans-serif --&gt;
&lt;!-- Display sans-serif and then emoji fallbacks --&gt;
&lt;match target="pattern"&gt;
&lt;test qual="any" name="family"&gt;
&lt;string&gt;sans-serif&lt;/string&gt;
&lt;/test&gt;
&lt;edit name="family" mode="prepend_first"&gt;
&lt;string&gt;emoji&lt;/string&gt;
&lt;/edit&gt;
&lt;/match&gt;
&lt;alias&gt;
&lt;family&gt;emoji&lt;/family&gt;
&lt;default&gt;&lt;family&gt;Noto Color Emoji&lt;/family&gt;&lt;/default&gt;
&lt;/alias&gt;
&lt;/fontconfig&gt;
</code></pre>
<p>All of the above granted, I wish I could do without emoji in my
terminal…</p>