I want to use Noto Color Emoji as my emoji font in Firefox. However Firefox renders them as zero-width invisible characters (not tofu/squares, the emojis are there, but take up zero space).
Here’s a screenshot of an emoji test using GitHub - April93/EmojiTest: Tests emoji font support.
I have another EndeavourOS system also with Noto Color Emoji installed (specifically the noto-fonts-emoji package from the Arch extra repository) and it renders correctly there.
I searched around the Internet and only found this: 1454152 - Noto Color Emoji doesn't show in Firefox for Linux if fontconfig antialias enabled, I tried disabling font aliasing by putting the following in my local fontconfig:
~/.config/fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<description>Disable anti-aliasing for Noto Color Emoji so it works in Firefox (bug 1454152).</description>
<match target="scan">
<test name="family" compare="eq" ignore-blanks="true">
<string>Noto Color Emoji</string>
</test>
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>false</bool>
</edit>
</match>
</fontconfig>
and even tried the following workaround mentioned by Adam Fontenot in the 37th comment:
Summary
<match target="font">
<test qual="any" name="family">
<string>Noto Color Emoji</string>
</test>
<edit name="embeddedbitmap">
<bool>true</bool>
</edit>
</match>
It didn’t work either.
Anyone have any ideas on why this is happening?
My Nix config:
fonts = {
fontconfig = {
enable = true;
};
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk
wqy_zenhei
];
};
Output of fc-match -v "Noto Color Emoji"
in the Nix system:
Summary
Pattern has 47 elts (size 48)
family: "Noto Color Emoji"(s)
familylang: "en"(s)
style: "Regular"(s)
stylelang: "en"(s)
fullname: "Noto Color Emoji"(w)
fullnamelang: "en"(s)
slant: 0(i)(s)
weight: 80(f)(s)
width: 100(f)(s)
size: 104.64(f)(w)
pixelsize: 109(f)(s)
spacing: 100(i)(s)
foundry: "GOOG"(s)
antialias: True(w)
hintstyle: 1(i)(w)
hinting: True(w)
verticallayout: False(s)
autohint: False(w)
globaladvance: True(s)
file: "/nix/store/q2ij8v7jawb1ar3njhvzmrg8jjwi4b6v-noto-fonts-color-emoji-2.042/share/fonts/noto/NotoColorEmoji.ttf"(s)
index: 0(i)(w)
outline: False(s)
scalable: True(s)
dpi: 75(f)(s)
rgba: 5(i)(w)
scale: 1(f)(s)
matrix: [0.114679 0; 0 0.114679](w)
charset:
0000: 00000000 03ff0409 00000000 00000000 00000000 00004200 00000000 00000000
0020: 00002000 10000000 00000200 00000000 00000000 00000000 00000000 00000008
0021: 00000000 02000004 00000000 00000000 03f00000 00000600 00000000 00000000
0023: 0c000000 00000100 00000000 00000000 00000000 00000000 00008000 070ffe00
0024: 00000000 00000000 00000000 00000000 00000000 00000000 00000004 00000000
0025: 00000000 00000000 00000000 00000000 00000000 00400c00 00000001 78000000
0026: 2132401f 0700c44d 800fff05 c8000169 1afc0000 60030c83 001ac130 27bf0600
0027: 2054bf24 00180102 00b85090 00000018 00e00000 80010002 00000000 00000000
0029: 00000000 00300000 00000000 00000000 00000000 00000000 00000000 00000000
002b: 180000e0 00000000 00210000 00000000 00000000 00000000 00000000 00000000
0030: 00000000 20010000 00000000 00000000 00000000 00000000 00000000 00000000
0032: 00000000 00000000 00000000 00000000 02800000 00000000 00000000 00000000
01f0: 00000010 00000000 00000000 00000000 00000000 00000000 00008000 00000000
01f1: 00000000 00000000 00000000 c0030000 07fe4000 00000000 00000000 ffffffc0
01f2: 04000006 07fc8000 00030000 00000000 00000000 00000000 00000000 00000000
01f3: ffffffff fffffff3 ffffffff ffffffff cecfffff ffffffff ffffffff ffb9ffff
01f4: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff bfffffff
01f5: ffffffff 3fffffff ffff7e00 07f980ff 00613c80 10060130 700e001c fc08810a
01f6: ffffffff ffffffff 0000ffff 00000000 ffffffff ffffffff f0e7f83f 1ff91a3f
01f7: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010fff
01f9: fffff000 f7ffffff ffffffbf ffffffff ffffffff ffffffff ffffffff ffffffff
01fa: 00000000 00000000 00000000 1fff0000 ffff01ff bfffffff 0fffc03f 01ff01ff
0e00: 00000000 03ff0000 00000000 87fffffe 00000000 00000000 00000000 00000000
0fe4: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00007fe0
0fe8: 00000000 00ffd000 00000000 00000000 00000000 00000000 00000000 00000000
(s)
lang: und-zsye(s)
fontversion: 133825(i)(s)
capability: "otlayout:DFLT"(w)
fontformat: "TrueType"(s)
embeddedbitmap: False(w)
decorative: False(s)
lcdfilter: 1(i)(w)
namelang: "en"(s)
prgname: "fc-match"(s)
postscriptname: "NotoColorEmoji"(s)
color: True(s)
symbol: False(s)
variable: False(s)
fonthashint: False(s)
order: 0(i)(s)
desktop: "KDE"(s)
namedinstance: False(s)
fontwrapper: "SFNT"(s)
pixelsizefixupfactor: 0.114679(f)(w)
Output of fc-match -v "Noto Color Emoji"
in the EndeavourOS system:
Summary
Pattern has 47 elts (size 48)
family: "Noto Color Emoji"(s)
familylang: "en"(s)
style: "Regular"(s)
stylelang: "en"(s)
fullname: "Noto Color Emoji"(w)
fullnamelang: "en"(s)
slant: 0(i)(s)
weight: 80(f)(s)
width: 100(f)(s)
size: 104.64(f)(w)
pixelsize: 109(f)(s)
spacing: 100(i)(s)
foundry: "GOOG"(s)
antialias: False(s)
hintstyle: 1(i)(w)
hinting: True(s)
verticallayout: False(s)
autohint: False(s)
globaladvance: True(s)
file: "/usr/share/fonts/noto/NotoColorEmoji.ttf"(s)
index: 0(i)(w)
outline: False(s)
scalable: True(s)
dpi: 75(f)(s)
rgba: 1(i)(w)
scale: 1(f)(s)
matrix: [0.114679 0; 0 0.114679](w)
charset:
0000: 00000000 03ff0409 00000000 00000000 00000000 00004200 00000000 00000000
0020: 00002000 10000000 00000200 00000000 00000000 00000000 00000000 00000008
0021: 00000000 02000004 00000000 00000000 03f00000 00000600 00000000 00000000
0023: 0c000000 00000100 00000000 00000000 00000000 00000000 00008000 070ffe00
0024: 00000000 00000000 00000000 00000000 00000000 00000000 00000004 00000000
0025: 00000000 00000000 00000000 00000000 00000000 00400c00 00000001 78000000
0026: 2132401f 0700c44d 800fff05 c8000169 1afc0000 60030c83 001ac130 27bf0600
0027: 2054bf24 00180102 00b85090 00000018 00e00000 80010002 00000000 00000000
0029: 00000000 00300000 00000000 00000000 00000000 00000000 00000000 00000000
002b: 180000e0 00000000 00210000 00000000 00000000 00000000 00000000 00000000
0030: 00000000 20010000 00000000 00000000 00000000 00000000 00000000 00000000
0032: 00000000 00000000 00000000 00000000 02800000 00000000 00000000 00000000
01f0: 00000010 00000000 00000000 00000000 00000000 00000000 00008000 00000000
01f1: 00000000 00000000 00000000 c0030000 07fe4000 00000000 00000000 ffffffc0
01f2: 04000006 07fc8000 00030000 00000000 00000000 00000000 00000000 00000000
01f3: ffffffff fffffff3 ffffffff ffffffff cecfffff ffffffff ffffffff ffb9ffff
01f4: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff bfffffff
01f5: ffffffff 3fffffff ffff7e00 07f980ff 00613c80 10060130 700e001c fc08810a
01f6: ffffffff ffffffff 0000ffff 00000000 ffffffff ffffffff f0e7f83f 1ff91a3f
01f7: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010fff
01f9: fffff000 f7ffffff ffffffbf ffffffff ffffffff ffffffff ffffffff ffffffff
01fa: 00000000 00000000 00000000 1fff0000 ffff01ff bfffffff 0fffc03f 01ff01ff
0e00: 00000000 03ff0000 00000000 87fffffe 00000000 00000000 00000000 00000000
0fe4: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00007fe0
0fe8: 00000000 00ffd000 00000000 00000000 00000000 00000000 00000000 00000000
(s)
lang: und-zsye(s)
fontversion: 133825(i)(s)
capability: "otlayout:DFLT"(w)
fontformat: "TrueType"(s)
embeddedbitmap: True(s)
decorative: False(s)
lcdfilter: 1(i)(w)
namelang: "en"(s)
prgname: "fc-match"(s)
postscriptname: "NotoColorEmoji"(s)
color: True(s)
symbol: False(s)
variable: False(s)
fonthashint: False(s)
order: 0(i)(s)
desktop: "KDE"(s)
namedinstance: False(s)
fontwrapper: "SFNT"(s)
pixelsizefixupfactor: 0.114679(f)(w)
Firefox version in Nix: 129.0
I’m on NixOS 24.05.4031.f1bad50880ba (Uakari) x86_64
Kernel: Linux 6.6.46
WM: KWin (X11)