samuelngs / apple-emoji-linux

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

[Bug] Missing regional letters and no fallback #50

Open Leny1996 opened 3 months ago

Leny1996 commented 3 months ago

Hello, maybe I'm not getting something regarding fontconfig, but here is the problem: I was using old AUR package with emojis, I've removed the package and moved to this package. Later after reboot I've noticed that some emojis are not working and I see blank space. I was playing with fontconfig (found out that Twemoji has those emojis), according to Emojipedia Now, I've changed my fontconfig to have something like:

  <alias binding="same">
    <family>Apple Color Emoji</family>
      <prefer>
        <family>Apple Color Emoji</family>
        <family>Twemoji</family>
      </prefer>
  </alias>

  <alias binding="strong">
    <family>emoji</family>
      <prefer>
        <family>Apple Color Emoji</family>
        <family>Twemoji</family>
      </prefer>
  </alias>

  <alias binding="strong">
    <family>EmojiOne</family>
    <prefer>
      <family>Apple Color Emoji</family>
      <family>Twemoji</family>
    </prefer>
  </alias>

  <alias binding="strong">
    <family>Emoji One</family>
    <prefer>
      <family>Apple Color Emoji</family>
      <family>Twemoji</family>
    </prefer>
  </alias>
...

And if I check ie.

$ fc-match 'Source Sans Pro' -s
NotoSansNerdFont-Regular.ttf: "NotoSans Nerd Font" "Regular"
NotoSansNerdFont-Italic.ttf: "NotoSans Nerd Font" "Italic"
apple-color-emoji.ttf: "Apple Color Emoji" "Regular"
twemoji.ttf: "Twemoji" "Regular"

I can see the proper order I wanted... but in a browser/any application, I cannot see Twemoji emojis on regional ones, but still blank space. If I modify font-family in DevTools and add Twemoji as first, then it renders properly. Previously I was using noto-fonts-emoji-apple.

dmlls commented 3 months ago

Hi @Leny1996, just to double-check, did you install the font through https://aur.archlinux.org/packages/ttf-apple-emoji? This font conflicts with ttf-twemoji-color, so I would imagine you don't have ttf-twemoji-color installed? (makepkg / yay, etc. will not let you have both installed).

Now, a possible solution that doesn't involve having to install other fonts would be to include these missing emoji into this font, as we've done in the past with certain emoji (see https://github.com/samuelngs/apple-emoji-linux/pull/47#issue-2204554772).

Leny1996 commented 2 months ago

Hi @dmlls, sorry for late response. Yes, I have ttf-apple-emoji installed from AUR, but regarding Twemoji I'm using this package: https://aur.archlinux.org/packages/ttf-twemoji Switched my config to Twemoji now, because it's unusable with Apple ones. Weird thing is that it should fallback to second emoji if particular unicode is not found, so if U+1F1F1 is not inside Apple Color Emoji, then try to use it from Twemoji etc. - that's how I imagine my setup provided in first post.

dmlls commented 2 months ago

Could you point me to some of the emoji missing in Apple Color Emoji?

I have the feeling that what's happening here is that the codepoints for these emoji are still being registered by Apple Color and mapped to no image, and that's why the blank spaces are there.

Leny1996 commented 2 months ago

Sure @dmlls. For example all of regional letters: https://emojipedia.org/search?q=regional