Emoji 在 Fcitx5 提示栏正常显示的字体配置
关于升级大版本的 Linux 发行版,我有个经验,不要太着急升级,至少等2个星期再说。
即便如此,还是会遇上各种使用的问题,
升级 Fedora 41 后,Color Emoji 无法在 Fcitx5 的输入法提示栏正常显示。
上网搜索了一番,估计和字体渲染相关,下面是具体的解决问题方法:
- 安装 Emoji 字体
sudo dnf install google-noto-color-emoji-fonts
sudo dnf install default-fonts-core-emoji
- 添加 color emoji 字体配置文件
/etc/fonts/conf.d/68-color-emoji.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test name="family" compare="contains">
<string>Emoji</string>
</test>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
<edit name="embeddedbitmap" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>
刷新字体文件缓存,执行命令
fc-cache -v
关闭 fcitx5,重新执行 fcitx5, 问题解决。
参考
Emoji 在 Fcitx5 提示栏正常显示的字体配置
https://usmacd.com/cn/fcitx5_emoji_display/