On 2022/03/20 08:56, Landry Breuil wrote:
> Le Sun, Mar 20, 2022 at 06:06:52AM +0000, Yifei Zhan a écrit :
> > At the moment firefox won't show any colored emoji out of the box,
> > despite bundled with Twemoji, firefox is unable to fallback to it by
> > default. To force it, we can copy the font to a directory known by
> > fontconfig and firefox will use it:
> >
> > mkdir -p ~/.fonts/twemoji/
> > # replace `firefox` with `firefox-esr` if you are using ESR
> > cp /usr/local/lib/firefox/fonts/TwemojiMozilla.ttf ~/.fonts/twemoji/
> > rm -r /home/user/.cache/fontconfig/*
> > fc-cache -rv # Not strictly needed, just in case
> >
> > Then go to a page with emoji, you should be able to see all the emojis.
> >
> > e.g. in the browser section of
> > https://unicode.org/emoji/charts/full-emoji-list.html
> >
> > and `fc-match -s emoji` will return TwemojiMozilla as an usable font.
> >
> > You can also force firefox to render emojis with a different font by
> > setting font.name-list.emoji property in about:config to the desired
> > font name, such as Noto Emoji, but Noto Emoji Color can't be randered.
> >
> > I'm not sure why firefox can't fallback to its bundled font by
> > default, but it's likely a problem with the system-wide font.conf,
> > since tor-browser, which bundles its own font.conf, can render emoji
> > out of the box.
>
> interesting, and thanks for finding that bug !
>
> i'm not sure the tor-browser approach is the best, i'll do a test adding
>
> @fontdir lib/${MOZILLA_PROJECT}/fonts/
>
> to the PLIST, that might help.
>
> Landry
Oh interesting.
Just adding this to fonts.conf fixes it:
<dir>/usr/local/lib/firefox/fonts</dir>
Perhaps the font should move to a subpackage or separate port, depended
on by both firefox and firefox-esr..