Sample Header Ad - 728x90

fontconfig fallback font for emoji doesn't work until I blacklist all other fonts

4 votes
0 answers
760 views
I want to use UbuntuMono Nerd Font as my main terminal font but render emoji characters using Noto Color Emoji . I have configured LXTerminal to use font UbuntuMono Nerd Font. I can see the primary and first fallback font files for this font with: ~ > fc-match "UbuntuMono Nerd Font" -s | head -n 2 Ubuntu Mono Nerd Font Complete.ttf: "UbuntuMono Nerd Font" "Regular" fa-brands-400.ttf: "Font Awesome 6 Brands" "Regular" To use Noto Color Emoji as the preferred fallback font for emoji characters not within UbuntuMono Nerd Font, I configure ~/.config/fontconfig/fonts.conf as follows: UbuntuMono Nerd Font Noto Color Emoji With this config, the output of fc-match indicates to me that this should work! ~ > fc-match "UbuntuMono Nerd Font" -s | head -n 2 Ubuntu Mono Nerd Font Complete.ttf: "UbuntuMono Nerd Font" "Regular" NotoColorEmoji.ttf: "Noto Color Emoji" "Regular" But it doesn't: '😀' is rendered within LXTerminal as a black & white smiley. I have also tried using `` elements: und-zsye Noto Color Emoji The only way I can get the coloured '😀' to render is by blacklisting all other fonts. Why is a less precedent font overruling Noto Color Emoji when the output of fc-match is listing it as the preferred fallback?
Asked by Squiffy (41 rep)
Aug 29, 2022, 11:08 AM