RoelN / composable-cbdt-poc

SIL Open Font License 1.1
0 stars 0 forks source link

How to compose large families #1

Open RoelN opened 5 years ago

RoelN commented 5 years ago

Composable Emoji

Target: Add the ~ 50.000 possible family combinations.

Artwork to compose families from

For each family member, 18 "small" images are needed, totalling 72 images:

Man - Center Man - Center - Skin tone 1 Man - Center - Skin tone 2 Man - Center - Skin tone 3 Man - Center - Skin tone 4 Man - Center - Skin tone 5

Man - Left Man - Left - Skin tone 1 Man - Left - Skin tone 2 Man - Left - Skin tone 3 Man - Left - Skin tone 4 Man - Left - Skin tone 5

Man - Right Man - Right - Skin tone 1 Man - Right - Skin tone 2 Man - Right - Skin tone 3 Man - Right - Skin tone 4 Man - Right - Skin tone 5

Woman - Center Woman - Center - Skin tone 1 Woman - Center - Skin tone 2 Woman - Center - Skin tone 3 Woman - Center - Skin tone 4 Woman - Center - Skin tone 5

Woman - Left Woman - Left - Skin tone 1 Woman - Left - Skin tone 2 Woman - Left - Skin tone 3 Woman - Left - Skin tone 4 Woman - Left - Skin tone 5

Woman - Right Woman - Right - Skin tone 1 Woman - Right - Skin tone 2 Woman - Right - Skin tone 3 Woman - Right - Skin tone 4 Woman - Right - Skin tone 5

Boy - Center Boy - Center - Skin tone 1 Boy - Center - Skin tone 2 Boy - Center - Skin tone 3 Boy - Center - Skin tone 4 Boy - Center - Skin tone 5

Boy - Left Boy - Left - Skin tone 1 Boy - Left - Skin tone 2 Boy - Left - Skin tone 3 Boy - Left - Skin tone 4 Boy - Left - Skin tone 5

Boy - Right Boy - Right - Skin tone 1 Boy - Right - Skin tone 2 Boy - Right - Skin tone 3 Boy - Right - Skin tone 4 Boy - Right - Skin tone 5

Girl - Center Girl - Center - Skin tone 1 Girl - Center - Skin tone 2 Girl - Center - Skin tone 3 Girl - Center - Skin tone 4 Girl - Center - Skin tone 5

Girl - Left Girl - Left - Skin tone 1 Girl - Left - Skin tone 2 Girl - Left - Skin tone 3 Girl - Left - Skin tone 4 Girl - Left - Skin tone 5

Girl - Right Girl - Right - Skin tone 1 Girl - Right - Skin tone 2 Girl - Right - Skin tone 3 Girl - Right - Skin tone 4 Girl - Right - Skin tone 5

Question: do we also want families from gender neutral emoji?

Note: since boy and girl don't change design, we should create left and right versions from the center one by GPOS positioning.

Current situation

Ligature substitutions: one specific combination points to one specific glyph.

Example for man + woman + girl:

<LigatureSet glyph="u1F468">
  ...
  <Ligature components="uni200D,u1F467,uni200D,u1F467" glyph="glyph01760"/>
  ...
</LigatureSet>

These are built based on the filename of the PNG, and aliases defined in a separate text file.

Example of aliases:

The police offer without specified gender gets mapped to police officer + male modifier:

1f46e → 1f46e_200d_2642 # POLICE OFFICER -> man police officer

And police officer without specified gender + light skin tone modifier gets mapped to police officer + light skin tone + male modifier:

1f46e_1f3fb → 1f46e_1f3fb_200d_2642 # light skin tone

Proposed situation

Adding ~ 50.000 ligature lookups isn't going to cut it. We should chain substitutions.

Changes from current process:

I believe you can generate the lookups from the filenames... https://github.com/davelab6/dancingshoes is really old but might be relevant.

https://github.com/typesupply/feaPyFoFum is a bit newer, same idea.

https://github.com/typesupply/feaTools is also super old and a bit different idea, but might be relevant.

Example replacements

We want a family emoji of:

So, if + indicates a skin tone modifier, and & a zwj:

man + skin tone 1 & woman + skin tone 3 & girl + skin tone 5

In unicode:

1f468 1f3fb 200d 1f469 1f3fd 200d 1f467 1f3ff

Replacements in this sequence:

Man + skin tone 1    →  Man skin tone 1
Woman + skin tone 3  →  Woman skin tone 3
Girl + skin tone 5   →  Girl skin tone 5

Man skin tone 1 [followed by] zwj + Woman skin tone 3  →  Small man skin tone 1 left
zwj + Woman skin tone 3 [preceded by] Small man skin tone 1 left  →  Small woman skin tone 3 right

zwj + Girl skin tone 5 [preceded by] Small woman skin tone 3 right  →  Small girl skin tone 5

Concerns/questions/notes

Would AFDKO be better at generating complex substitutions? Thus would require significant change in current ttx/FontTools tooling. fontmake can build a UFO with a features.fea file, same as AFDKO.

davelab6 commented 5 years ago

A gSheet is probably the best way to do that; you can use the web API to get it as CSV data, and churn it all out that way?

RoelN commented 5 years ago

@davelab6 Not sure what you're referring to — the list of replacements? If so, that's been taken care of!

davelab6 commented 5 years ago

Sorry this is a little unclear. I was referring to this, where you asked, and I commented,

Would AFDKO be better at generating complex substitutions? Thus would require significant change in current ttx/FontTools tooling.

fontmake can build a UFO with a features.fea file, same as AFDKO.

I think a gSheet could be a good way to collab with font authors; they can set up col A for the result and then cols B+ for the list of items that when entered lead to that result; then you can use the web API to get that data as CSV, and churn it all into the features.fea file.

Also in case this was not yet answered:

Question: do we also want families from gender neutral emoji?

Yes, I think so