54 lines
		
	
	
		
			No EOL
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			No EOL
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
 | 
						|
         
 | 
						|
         <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><fontconfig>
 | 
						|
	<!-- If the requested font is sans-serif -->
 | 
						|
	<!-- Display sans-serif and then emoji fallbacks -->
 | 
						|
	<match target="pattern">
 | 
						|
		<test qual="any" name="family">
 | 
						|
			<string>sans-serif</string>
 | 
						|
		</test>
 | 
						|
		<edit name="family" mode="prepend_first">
 | 
						|
			<string>emoji</string>
 | 
						|
		</edit>
 | 
						|
	</match>
 | 
						|
	
 | 
						|
	<alias>
 | 
						|
		<family>emoji</family>
 | 
						|
		<default><family>Noto Color Emoji</family></default>
 | 
						|
	</alias>
 | 
						|
</fontconfig>
 | 
						|
</code></pre>
 | 
						|
 | 
						|
<p>All of the above granted, I wish I could do without emoji in my
 | 
						|
terminal…</p>
 | 
						|
        
 | 
						|
       |