Created attachment 1321762 [details] pango-emoji-test.txt, contains U+1F600 followed by a line break. I am using Fedora 26 with all current updates. Several fonts containing a glyph for U+1F600 GRINNING FACE are installed: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ fc-list "Noto Color Emoji" /usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf: Noto Color Emoji:style=Regular [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ fc-list "Symbola" /usr/share/fonts/gdouros-symbola/Symbola.ttf: Symbola:style=Regular [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ fc-list "DejaVu Sans" /usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold /usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book /usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf: DejaVu Sans,DejaVu Sans Light:style=ExtraLight /usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique /usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique /usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold Oblique [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ Now I am trying to display the attached test file the attached test file pango-emoji-test.txt which contains U+1F600 GRINNING FACE followed by a line break with pango-view: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ pango-view --font='Noto Color Emoji 50' pango-emoji-test.txt & [1] 6676 [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ It displays the emoji *not* using the requested 'Noto Color Emoji' font but with some other font instead: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ grep fonts /proc/6676/maps 7f4467435000-7f44674ee000 r--p 00000000 fd:00 916645 /usr/share/fonts/dejavu/DejaVuSans.ttf [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ The versions of pango and the google-noto-emoji-fonts packages are: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q pango pango-1.40.11-3.fc26.x86_64 [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ rpm -q google-noto-emoji-fonts google-noto-emoji-fonts-20170827-1.fc26.noarch [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ Now I downgrade pango: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ sudo dnf downgrade pango [sudo] password for mfabian: Last metadata expiration check: 2:56:42 ago on Mon 04 Sep 2017 09:26:27 CEST. Dependencies resolved. ======================================================================================================== Package Arch Version Repository Size ======================================================================================================== Downgrading: pango x86_64 1.40.6-1.fc26 fedora 280 k Transaction Summary ======================================================================================================== Downgrade 1 Package Total download size: 280 k Is this ok [y/N]: y Downloading Packages: pango-1.40.6-1.fc26.x86_64.rpm 635 kB/s | 280 kB 00:00 -------------------------------------------------------------------------------------------------------- Total 163 kB/s | 280 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Downgrading : pango-1.40.6-1.fc26.x86_64 1/2 Running scriptlet: pango-1.40.6-1.fc26.x86_64 1/2 Erasing : pango-1.40.11-3.fc26.x86_64 2/2 Running scriptlet: pango-1.40.11-3.fc26.x86_64 2/2 Verifying : pango-1.40.6-1.fc26.x86_64 1/2 Verifying : pango-1.40.11-3.fc26.x86_64 2/2 Downgraded: pango.x86_64 1.40.6-1.fc26 Complete! [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ And try again to display the test file: [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ pango-view --font='Noto Color Emoji 50' pango-emoji-test.txt & [2] 6891 [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ Now it is displayed using the correct font. [mfabian@Fedora-Workstation-netinst-x86_6 ~]$ grep fonts /proc/6891/maps 7f7725d53000-7f772643e000 r--p 00000000 fd:00 941063 /usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf [mfabian@Fedora-Workstation-netinst-x86_6 ~]$
Created attachment 1321789 [details] emoji.png Screenshot showing how the emoji U+1F600 looks like when "Noto Color Emoji" is used and when not. The instance of pango-viewer at the top left shows the test file displayed using the “DejaVu Sans” font (pango1.40.6-1.fc26.x86_64), the instance of pango-viewer below that shows the test file displayed using the “Noto Color Emoji” font. As the “Noto Color Emoji” font was explicitely requested on the command line of pango-viewer, using any other font is wrong.
Hm, that is because pango relies on the latest updates of fontconfig to choose emoji fonts and managing emoji fonts separately in the code. no matter what fonts you specify, pango will uses a "emoji font" when emoji sequence appears. so the right solution would be to update fontconfig which supports emoji. For reference: https://git.gnome.org/browse/pango/commit/?id=fe0669798d617406b52a638fb2525b1f7527a2d6
(In reply to Akira TAGOH from comment #2) > Hm, that is because pango relies on the latest updates of fontconfig to > choose emoji fonts and managing emoji fonts separately in the code. no > matter what fonts you specify, pango will uses a "emoji font" when emoji > sequence appears. so the right solution would be to update fontconfig which > supports emoji. > > For reference: > > https://git.gnome.org/browse/pango/commit/ > ?id=fe0669798d617406b52a638fb2525b1f7527a2d6 I see! I can see some emoji related commits in fontconfig git master. So we need an update of fontconfig for Fedora 26 then, right?
(In reply to Mike FABIAN from comment #3) > So we need an update of fontconfig for Fedora 26 then, right? Right.
OK, I tried fontconfig master and it works better. Better in the sense that it *always* uses a color emoji font like "Noto Color Emoji" if possible. But that means that now pango-view --font='Symbola 50' pango-emoji-test.txt & does not work anymore, it still uses "Noto Color Emoji" even though "Symbola" has been requested on the command line. Is it possible to force the use of a black and white emoji font like Symbola?
If you request a non-color font, yes.
(In reply to Akira TAGOH from comment #6) > If you request a non-color font, yes. But how? Requesting Symbola on the command line of pango-view asin comment#5 does not work anymore. And requesting it in a config file of some program using pango does not work anymore either.
I cannot choose the emoji font at all anymore. If I have the fonts “Emoji One”, “Noto Color Emoji”, and “Symbola” installed, pango-view will display emoji *always* using “Emoji One”, no matter what font I request on the command line. I.e. as long as “Emoji One” is installed, pango-view --font='Noto Color Emoji 50' pango-emoji-test.txt & uses “Emoji One". Only if I delete “Emoji One”, the above pango-view command will use “Noto Color Emoji”.
Well, given that you use the latest fontconfig, that is because of the order of emoji fonts in 45-generic.conf. You could customize your fonts.conf to have Noto Color Emoji: <match> <test name="family"><string>emoji</string></test> <edit name="family" mode="prepend">Noto Color Emoji</edit> </match> Or to have non-color: <match> <test name="family"><string>emoji</string></test> <edit name="family" mode="prepend"><string>Noto Color Emoji</string></edit> <edit name="color"><bool>false</bool></edit> </match>
(In reply to Akira TAGOH from comment #9) > Well, given that you use the latest fontconfig, that is because of the order > of emoji fonts in 45-generic.conf. > > You could customize your fonts.conf to have Noto Color Emoji: > <match> > <test name="family"><string>emoji</string></test> > <edit name="family" mode="prepend">Noto Color Emoji</edit> > </match> That doesn’t work for me, I still get "Emoji One" if it is installed. > Or to have non-color: > <match> > <test name="family"><string>emoji</string></test> > <edit name="family" mode="prepend"><string>Noto Color Emoji</string></edit> > <edit name="color"><bool>false</bool></edit> > </match> That makes the black and white font "Noto Emoji" to be used *always*, no matter what I specify on the command line of pango-view. So I still cannot choose “Symbola”. Editing fonts.conf is quite difficult and not really possible for normal users. Shouldn’t it be possible somehow to select a font for emoji from an application? For example, the “emoji-picker” program has a font selection menu. With the latest fontconfig and pango, this font selection menu does not work anymore, it always chooses the same font depending on the fontconfig setup. So one cannot easily switch the font in emoji-picker anymore to see how the emoji would look like in some other font, one always has to do rather complicated editing of fonts.conf.
(In reply to Mike FABIAN from comment #10) > That makes the black and white font "Noto Emoji" to be used *always*, > no matter what I specify on the command line of pango-view. As I said earlier, pango now maintains a normal font and an emoji font separately, and there are no options to override it. you could file an RFE for that to upstream. That would helps for picker issue too I suppose.
(In reply to Akira TAGOH from comment #11) > (In reply to Mike FABIAN from comment #10) > > That makes the black and white font "Noto Emoji" to be used *always*, > > no matter what I specify on the command line of pango-view. > > As I said earlier, pango now maintains a normal font and an emoji font > separately, and there are no options to override it. you could file an RFE > for that to upstream. > That would helps for picker issue too I suppose. Yes, I’ll report an RFE upstream, I think it should be possible to choose a font for emoji using pango without having to edit fonts.conf.
(In reply to Mike FABIAN from comment #12) > (In reply to Akira TAGOH from comment #11) > > (In reply to Mike FABIAN from comment #10) > > > That makes the black and white font "Noto Emoji" to be used *always*, > > > no matter what I specify on the command line of pango-view. > > > > As I said earlier, pango now maintains a normal font and an emoji font > > separately, and there are no options to override it. you could file an RFE > > for that to upstream. > > That would helps for picker issue too I suppose. > > Yes, I’ll report an RFE upstream, I think it should be possible to choose > a font for emoji using pango without having to edit fonts.conf. https://bugzilla.gnome.org/show_bug.cgi?id=787365
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.