samuelngs / apple-emoji-linux

Brings Apple's vibrant emojis to your Linux experience
Apache License 2.0
722 stars 52 forks source link

Some emoji not displaying correctly #5

Closed BananaManCJ closed 2 years ago

BananaManCJ commented 4 years ago

The emojis seem to work better in Google Chrome than in Firefox. Chrome Firefox

BananaManCJ commented 4 years ago

This could possibly be fixed with a fontconfig entry but I am new to Linux and don't know how that works.

samuelngs commented 4 years ago

I will take a look over the weekend πŸ‘

BananaManCJ commented 4 years ago

Did you see any problems over the weekend?

BananaManCJ commented 4 years ago

I figured it out, create a file at ~/.config/fontconfig/conf.d/01-emoji.conf with these lines

<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>serif</family>
    <prefer>
      <family>Apple Color Emoji</family>
    </prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Apple Color Emoji</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Apple Color Emoji</family>
    </prefer>
  </alias>
</fontconfig>
BananaManCJ commented 4 years ago

Then run fc-cache -f -v

BananaManCJ commented 4 years ago

Actually, that didn't fix it. I think it's conflicting with opensymbol.

bc1bb commented 4 years ago

The emojis seem to work better in Google Chrome than in Firefox. Chrome Firefox

It doesnt apply for me on Firefox, but it does on Chromium. screenshot

Arch Linux (Manjaro 19.0, I downloaded the last release and ran fc-cache and restarted Firefox) - Firefox 75.0 - Chromium 81.0.4044.113.

samuelngs commented 4 years ago

Did you see any problems over the weekend?

Emoji renders correctly on both Firefox and Chrome for me, but it doesn't on Chromium. I'm trying to get that fixed at the moment, and hopefully, that would also fix your problem with Firefox.

samuelngs commented 4 years ago

The emojis seem to work better in Google Chrome than in Firefox. Chrome Firefox

It doesnt apply for me on Firefox, but it does on Chromium. screenshot

Arch Linux (Manjaro 19.0, I downloaded the last release and ran fc-cache and restarted Firefox) - Firefox 75.0 - Chromium 81.0.4044.113.

Have you applied these rules under $HOME/.config/fontconfig/conf.d?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias binding="strong">
    <family>emoji</family>
    <default><family>Apple Color Emoji</family></default>
  </alias>
  <alias binding="strong">
    <family>Noto Color Emoji</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Segoe UI Emoji</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Emoji One</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
</fontconfig>

Hope that helps πŸ˜ƒ

BananaManCJ commented 4 years ago

That fontconfig entry fixed my problem, but even after uninstalling fonts-noto-color-emoji, some of the people look like they are using the Noto Color Emoji font.

bc1bb commented 4 years ago

The emojis seem to work better in Google Chrome than in Firefox. Chrome Firefox

It doesnt apply for me on Firefox, but it does on Chromium. screenshot Arch Linux (Manjaro 19.0, I downloaded the last release and ran fc-cache and restarted Firefox) - Firefox 75.0 - Chromium 81.0.4044.113.

Have you applied these rules under $HOME/.config/fontconfig/conf.d?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias binding="strong">
    <family>emoji</family>
    <default><family>Apple Color Emoji</family></default>
  </alias>
  <alias binding="strong">
    <family>Noto Color Emoji</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Segoe UI Emoji</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
  <alias binding="strong">
    <family>Emoji One</family>
    <prefer><family>Apple Color Emoji</family></prefer>
  </alias>
</fontconfig>

Hope that helps smiley

Oh ! Thank you, now it works ! But I don't get the same bug as @BananaManCJ, for me, only Firefox window and Tab name containing emojis are showed in Samsung-style.

BananaManCJ commented 4 years ago

Oh ! Thank you, now it works ! But I don't get the same bug as @BananaManCJ, for me, only Firefox window and Tab name containing emojis are showed in Samsung-style.

That happened to me too, but it went away after clearing the fontconfig cache and rebooting

BananaManCJ commented 4 years ago

I did a fresh install of Pop!_OS and all of the emojis are working now, this is definitely a fontconfig error and not a problem with the font itself. Is there a way to see what the font prioritization is?

BananaManCJ commented 4 years ago

Scratch that, many emoji are still the Noto Color Emoji style, even though fonts-noto-color-emoji isn't installed and the NotoColorEmoji.ttf isn't in my /usr/share/fonts or ~/.local/share/fonts folders. I think the problem is acually with the Apple Color Emoji font itself.

BananaManCJ commented 4 years ago

Emoji Skin Tones

BananaManCJ commented 4 years ago

Ok, so the problem is with the ttf itself. When it pulls the images it uses to build the ttf, some of the images are the Noto Color Emoji style. You can see this if you go to the build/emoji folder in the repository directory when it's building the font.

BananaManCJ commented 4 years ago

The font needs to be re-extracted and checked before all of the fonts are Apple style

samuelngs commented 4 years ago

Thanks, @BananaManCJ . Yeah, some of the emojis are not mapped correctly, which was still in progress. I misunderstood you were having an issue with some emojis showing in black and white symbols πŸ˜“. Anyways, I will be working on it and will probably have an update on this or next weekend (depends on my availability).

BananaManCJ commented 4 years ago

What is the script that extracts the emoji from the ttc? I can't find it.

samuelngs commented 4 years ago

It's been removed. But you could find it in old commits.

samuelngs commented 4 years ago

Update: Most of the incorrect mapped emojis are fixed, some are still in the works. You can find the latest version of AppleColorEmoji.ttf at the release page.

BananaManCJ commented 4 years ago

The newest release is still from 2 weeks ago

BananaManCJ commented 4 years ago

Looks like the past two builds failed

samuelngs commented 4 years ago

I updated the ttf manually 2 days ago. Build pipeline is currently broken, and I haven't had a chance to fix it yet.

BananaManCJ commented 4 years ago

Would you like me to make a list of the emojis that are currently broken?

BananaManCJ commented 4 years ago

Looks like these are the only emoji mapped incorrectlyπŸ‘¨β€πŸ‘©β€πŸ‘§πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦πŸ‘¨β€πŸ‘©β€πŸ‘¦β€πŸ‘¦πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘§πŸ‘©β€πŸ‘©β€πŸ‘¦πŸ‘©β€πŸ‘©β€πŸ‘§πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘¦πŸ‘©β€πŸ‘©β€πŸ‘¦β€πŸ‘¦πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘§πŸ‘¨β€πŸ‘¨β€πŸ‘¦πŸ‘¨β€πŸ‘¨β€πŸ‘§πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘¦πŸ‘¨β€πŸ‘¨β€πŸ‘¦β€πŸ‘¦πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘§πŸ‘©β€πŸ‘§β€πŸ‘¦πŸ‘©β€πŸ‘¦β€πŸ‘¦πŸ‘©β€πŸ‘§β€πŸ‘§πŸ‘¨β€πŸ‘§β€πŸ‘¦πŸ‘¨β€πŸ‘¦β€πŸ‘¦πŸ‘¨β€πŸ‘§β€πŸ‘§

samuelngs commented 4 years ago

Thanks @BananaManCJ. Yay! only a few left.

ciurca commented 4 years ago

On Ubuntu the emojis didn't load correctly so I tried @BananaManCJ 's solution and it works fine, but doesn't load the emoji in the picture for some reason. With @samuelngs it loads that emoji correctly, but emojis don't appear in the tab part of Brave (haven't tried any other browser.

image

So if you are on Ubuntu, I'd say stick with @BananaManCJ solution.

I thought this may be of help to someone in the future. :smile:

anthr76 commented 4 years ago

I'm facing a similar issue on Fedora 32. Though applying BananaManCJ font config most if not all emoji's are mapped correctly. Though it looks like it's aliasing different fonts then what Fedora uses by default. Is this okay or is overwriting my default font?

<alias>
    <family>serif</family>
    <prefer>
      <family>Apple Color Emoji</family>
    </prefer>
  </alias>

Though my system font is cantrell. Should I update accordingly?

aflueckiger commented 3 years ago

On my Manjaro System KDE, the proposed config of @BananaManCJ didn't work. I used the following config that works as expected:

$HOME/.config/fontconfig/conf.d

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <alias>
   <family>sans-serif</family>
   <prefer>
     <family>Noto Sans</family>
     <family>Apple Color Emoji</family>
     <family>Noto Emoji</family>
     <family>DejaVu Sans</family>
   </prefer> 
 </alias>

 <alias>
   <family>serif</family>
   <prefer>
     <family>Noto Serif</family>
     <family>Apple Color Emoji</family>
     <family>Noto Emoji</family>
     <family>DejaVu Serif</family>
   </prefer>
 </alias>

 <alias>
  <family>monospace</family>
  <prefer>
    <family>Noto Mono</family>
    <family>Apple Color Emoji</family>
    <family>Noto Emoji</family>
   </prefer>
 </alias>
</fontconfig>

It is a modified version from here: https://chrpaul.de/2019/07/Enable-colour-emoji-support-on-Manjaro-Linux.html