With the recent emoji related changes in pango and fontconfig, it is not possible to select a font to be used for emoji anymore from an application
@mfabian
Submitted by Mike FABIAN Link to original bug (#787365)
Description
Created attachment 359272 pango-emoji-test.txt
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1488096
With pango 1.40.12 and fontconfig from git master, it is not possible to choose the font used for emoji from pango anymore.
For example if I have the fonts "Emoji One", "Noto Color Emoji", and "Symbola" installed and try this:
pango-view --font='Symbola 50' pango-emoji-test.txt & pango-view --font='Noto Color Emoji 50' pango-emoji-test.txt &
(where pango-emoji-test.txt is the attached test file containing U+1F600 GRINNING FACE). Then I get the emoji displayed using "Emoji One" always. That I specified different fonts with pango-view is ignored.
When I delete the "Emoji One" font, "Noto Color Emoji" is used.
Instead of deleting the "Emoji One" font, I could also edit fonts.conf to make fontconfig prefer the "Noto Color Emoji" font.
But editing fonts.conf is quite difficult for normal users.
I think it should be possible somehow to specify the desired emoji font using a pango setting.
That would be especially useful for applications which offer emoji selectors.
But also for other applications, for example it used to be possible to have a setting like
font pango: DejaVu Sans, Symbola 12
in the config file for the i3 window manager (~/.config/i3/config) to force black and white emoji from the Symbola font to be displayed in the i3 status bar. But now this is ignored, instead of “Symbola” “Emoji One” or “Noto Color Emoji” are used, depending on which of these is installed.
The latest version of “Noto Color Emoji” seems to work better for me than “Emoji One” because it contains all the emoji which have recently been added to Unicode 10.0.0. So it would be nice to choose “Noto Color Emoji” as the emoji font in the setup or on the command line of an application using pango without having to edit fonts.conf.
Attachment 359272, "pango-emoji-test.txt":
pango-emoji-test.txt
Version: 1.40.x