Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turning OFF 'person' does not hide 'person' emoji variants #13

Open
ghost opened this issue Jan 2, 2023 · 3 comments
Open

Turning OFF 'person' does not hide 'person' emoji variants #13

ghost opened this issue Jan 2, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Jan 2, 2023

Describe the bug
Disabling person does not hide person emoji variants

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Options > Gender'
  2. Click on man and/or woman to turns ON
  3. Click on person to turns OFF
  4. See error

Expected behavior
Hide person variants if is person is turned OFF, while man and/or woman is turned ON.

Versions
Specify versions:
OS: Linux (Debian 11)
Qt: 5.15.2
EFCK: 1.0

Additional context, screenshots

Screenshot_2023-01-02_07-57-30
Screenshot_2023-01-02_07-58-15

@kernc
Copy link
Member

kernc commented Jan 3, 2023

I see we just do a rudimentary scan for "person":

efck/efck/emoji.py

Lines 26 to 30 in 096a7b6

# Invert emoji filters from options
should_skip_emoji = {k for filters in config_state[EmojiTab.__name__].values()
for k, is_enabled in filters.items()
if not is_enabled}
should_skip_emoji = re.compile(fr'(?:^|(?:[:,] ))\b(?:{"|".join(should_skip_emoji)})').search

but a "person emoji" is apparently any "X" for which also "man X" and "woman X" exist:
U+1F9D1 U+200D U+2695 U+FE0F ; 12.1 # 🧑‍⚕️ health worker
U+1F9D1 U+1F3FB U+200D U+2695 U+FE0F ; 12.1 # 🧑🏻‍⚕️ health worker: light skin tone
U+1F9D1 U+1F3FC U+200D U+2695 U+FE0F ; 12.1 # 🧑🏼‍⚕️ health worker: medium-light skin tone
U+1F9D1 U+1F3FD U+200D U+2695 U+FE0F ; 12.1 # 🧑🏽‍⚕️ health worker: medium skin tone
U+1F9D1 U+1F3FE U+200D U+2695 U+FE0F ; 12.1 # 🧑🏾‍⚕️ health worker: medium-dark skin tone
U+1F9D1 U+1F3FF U+200D U+2695 U+FE0F ; 12.1 # 🧑🏿‍⚕️ health worker: dark skin tone
U+1F468 U+200D U+2695 U+FE0F ; 4.0 # 👨‍⚕️ man health worker
U+1F468 U+1F3FB U+200D U+2695 U+FE0F ; 4.0 # 👨🏻‍⚕️ man health worker: light skin tone
U+1F468 U+1F3FC U+200D U+2695 U+FE0F ; 4.0 # 👨🏼‍⚕️ man health worker: medium-light skin tone
U+1F468 U+1F3FD U+200D U+2695 U+FE0F ; 4.0 # 👨🏽‍⚕️ man health worker: medium skin tone
U+1F468 U+1F3FE U+200D U+2695 U+FE0F ; 4.0 # 👨🏾‍⚕️ man health worker: medium-dark skin tone
U+1F468 U+1F3FF U+200D U+2695 U+FE0F ; 4.0 # 👨🏿‍⚕️ man health worker: dark skin tone
U+1F469 U+200D U+2695 U+FE0F ; 4.0 # 👩‍⚕️ woman health worker

🤔

@kernc kernc added the bug Something isn't working label Jan 3, 2023
@ghost
Copy link
Author

ghost commented Jan 3, 2023

Is it Unicode version: 12.1 and 4.0?

U+1F9D1 U+200D U+2695 U+FE0F ; 12.1 # 🧑‍⚕️ health worker
...
U+1F468 U+200D U+2695 U+FE0F ; 4.0 # 👨‍⚕️ man health worker 

If so, maybe it needs to add setting for "Unicode version" in "Options".

N.B. In Android app "UnicodePad" there is Unicode version setting for compatibility issues:

@kernc
Copy link
Member

kernc commented Jan 3, 2023

Is it Unicode version: 12.1 and 4.0?

Those are just Unicode versions that introduced the symbol. Unreliable and not future-compatible.

I'd rather not (have the user) filter by Unicode version. We simply enumerate all the glyphs from the latest (vendored) Unicode standard, and the user might see some of the emoji icons blank, depending on the platform/font availability.

@kernc kernc added the good first issue Good for newcomers label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

1 participant