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

Feature Request: Gendered emojis #18

Open
leb-kuchen opened this issue Aug 11, 2024 · 3 comments
Open

Feature Request: Gendered emojis #18

leb-kuchen opened this issue Aug 11, 2024 · 3 comments
Labels
feature New feature or request

Comments

@leb-kuchen
Copy link

Genders were mentioned in #1, but I think they've been forgotten.
This could be generated by the code points or the names of the emojis.

@rossmacarthur rossmacarthur added the feature New feature or request label Aug 13, 2024
@rossmacarthur
Copy link
Owner

rossmacarthur commented Aug 13, 2024

This is definitely possible, but it doesn't seem to be as concretely defined in the spec as skin tones are. Skin tones always follow particular code points but for gender the actual base code point for the emoji is different for man, woman, person variants. Not sure if there is a pattern. It might require a somewhat manual mapping. Some examples:

1F64E                # 🙎 E0.6 person pouting
1F64E 200D 2642 FE0F # 🙎‍♂️ E4.0 man pouting
1F64E 200D 2640 FE0F # 🙎‍♀️ E4.0 woman pouting


1F9D1 200D 1F373 # 🧑‍🍳 E12.1 cook
1F468 200D 1F373 # 👨‍🍳 E4.0 man cook
1F469 200D 1F373 # 👩‍🍳 E4.0 woman cook

Proposed API

enum Gender {
    Neutral,
    Male,
    Female,
}

impl Emoji {
    pub fn gender(&self) -> Option<Gender>;
    pub fn genders(&self) -> Option<impl Iterator<Item = &Self> + Clone>;
    pub fn with_gender(&self, gender: Gender -> Option<&Self>;
}

@leb-kuchen
Copy link
Author

leb-kuchen commented Aug 13, 2024

These example you have listed are the main patterns:

  1. {BOY,GIRL,CHILD,MAN,OLD_MAN_OLD_WOMAN,PERSON}
  2. ZWJ GENDER

There are a few exceptions, and the subgroup family requires special handling.
For the 1st case, the first character needs to be replaced.
For the 2nd case, the gender symbol needs to be replaced or added.

@leb-kuchen
Copy link
Author

And it would also be useful to add an age field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants