【转移】终端表情符号不能正常显示解决方案

本文写于2022.9.14,转移自原博客

最近发现我的fish shell不能正常显示表情符号,即使安装了noto-font-emoji也不行。

fish shell

解决方案:

创建/etc/fonts/local.conf,内容:

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"><fontconfig> <alias>   <family>sans-serif</family>   <prefer>     <family>Noto Sans</family>     <family>Noto Color Emoji</family>     <family>Noto Emoji</family>     <family>DejaVu Sans</family>   </prefer>  </alias>  <alias>   <family>serif</family>   <prefer>     <family>Noto Serif</family>     <family>Noto Color Emoji</family>     <family>Noto Emoji</family>     <family>DejaVu Serif</family>   </prefer> </alias>  <alias>  <family>monospace</family>  <prefer>    <family>Noto Mono</family>    <family>Noto Color Emoji</family>    <family>Noto Emoji</family>    <family>DejaVu Sans Mono</family>   </prefer> </alias></fontconfig>