mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
226 stars 15 forks source link

[BUG] emoji-picker fallback replaces **all** emoji with fallback versions, in most cases #508

Open ferdnyc opened 5 months ago

ferdnyc commented 5 months ago

Describe the bug When browsing in the emoji-picker window using a non-default emoji font, in most cases activating the "Fallback" checkbox will replace ALL emoji with the ones from the default emoji font, not only the missing glyphs.

To Reproduce Steps to reproduce the behavior:

  1. Open "Emoji Picker", with Fallback unchecked
  2. Select a non-default font (I used "Twemoji") which has some coverage gaps
  3. Select a category, such as "food", that contains missing emoji glyphs
  4. Click the "Fallback" checkbox to enable fallback

Expected behavior Only the missing glyphs not present in the Twemoji font will be filled in with glyphs from the default Noto Color Emoji font.

Screenshots or videos

'food' category in Twemoji with fallback off

image

'food' category in Twemoji with fallback enabled

image

'food' category in Noto Color Emoji with fallback off

image

emoji-picker version? emoji-picker-2.25.3-1.fc39.noarch from Fedora repo

ibus version? Not applicable, but ibus-1.5.29-1.fc39.x86_64 from Fedora repo

Distribution and version? Fedora 39

Desktop and version? GNOME Shell 45.5

Xorg or Wayland? Wayland

Additional context

For some reason, this doesn't happen in the "regional" category — and only in the "regional" category.

'regional' category in Twemoji with fallback off

image

'regional' category in Twemoji with fallback on

image

'regional' category in Noto Color Emoji (falback off)

image

ferdnyc commented 5 months ago

Interestingly, "Fallback" appears to function... well, ''differently'', if I select a non-emoji font, like Symbola, which does contain some Emoji characters. Then, activating Fallback does replace only the missing glyphs with their emoji presentations:

image

image

But that's actually kind of super weird, and I'm not sure it's how fallback is really supposed to work.

(Unicode TR51 defines ''fallback'' presentations for Emoji, but they're something different than font-fallback. One of the definitions they give for an emoji fallback presentation involves displaying a composed emoji as the individual emoji that make up the sequence, instead of the product of their composition.

For example, the :rainbow_flag: emoji is formed by composing the :white_flag: emoji and the :rainbow: emoji together using a Zero-Width Joiner. In implementations where :rainbow_flag: is unavailable, the fallback presentation would be to display :white_flag::rainbow:.)