GaZaTu / x11-emoji-picker

Linux XServer emoji picker
MIT License
203 stars 6 forks source link

[Option request] Use system emojis #17

Closed dmlls closed 2 years ago

dmlls commented 2 years ago

First of all, thanks for this great color picker! 🙂

I understand that bundling an emoji pack (i.e.., Twemoji) together with the color picker makes sense from the point of view of ensuring that emojis will be correctly displayed inside the color picker. However, since I don't use Twemoji in my system, there is inconsistency between the emojis displayed in the color picker, and how they appear on my system after inserting them.

Therefore, it might be useful to have an option that allows using the system emojis (disabled by default). Is this doable/does it make sense to you?

GaZaTu commented 2 years ago

ye sure makes sense, gonna look into it later this afternoon 😊

GaZaTu commented 2 years ago

@dmlls @zneix check out #18 and tell me what you think / if it works for your installed emoji font

dmlls commented 2 years ago

Wow, thanks for the quick response!

So it does work 🥳 Only issue is that missing emojis that expand to several emojis mess with the alignment:

Screenshot_20220126_230549

I know this is not your fault though ;) I wonder if it would be possible to not display unsupported emojis? That way the user wouldn't have to manually configure the Unicode version.

For unsupported, multiple-codepoint emojis (i.e., those which will expand to several emojis) a simple heuristic would be checking if they occupy more space than a single emoji, and in that case, consider them unsupported and not show them.

zneix commented 2 years ago

So it does work partying_face Only issue is that missing emojis that expand to several emojis mess with the alignment:

I'm pretty sure this is the cause of some combined emojis being incorrectly renderred, I experience same/similar issue on my end: donkzatu

I wonder if it would be possible to not display unsupported emojis?

I'm not sure if this is the way to go, perhaps instead there should be some way to fix these 'broken emojis', it looks like these emojis are missing ZWJ (zero-width joiner) but that's system font's fault, tho I wonder if inserting that character 'manually' could fix this.

P. S. A bit off-topic, but in another project we've recently had to deal with combined emojis being 'broken' as well; if you want, you can see our effort on fixing these @ issues linked in twitchdev/issues#307.

GaZaTu commented 2 years ago

@dmlls you're right i forgot to mention this issue. I guess i could look into some kind of heuristic, but what i actually had planned was to set maxEmojiVersion in the emoji picker to the version supported by your font (12 for example). See the 4th paragraph in the updated readme.

@zneix thats not actually the same issue, because here the emoji font simply doesn't support the emoji itself yet (e.g. it doesn't have an image for it) and so it shows them separately.

dmlls commented 2 years ago

Maybe you could set a fixed size an emoji can take, and if it takes more (i.e., the emoji has expanded into several emojis), simply scale it down? This is similar to how KDE's emoji picker works (see last row):

Screenshot_20220127_100827

GaZaTu commented 2 years ago

ok look this:

Screenshot_20220127_203855