The emoji name tool is used to generate titles of emoji images in
pages on the get/noto web site, and group them into related sets.
The original emoji name tool in nototools was based on various
informal emoji name data files plus additional tweaks. Now there
is a standard source of this data and it is parsed by unicode_data
in nototools. So we start with that data.
The name data from there is designed for Unicode use and it not
quite appropriate for titles in this format. This tool tweaked
those names. This operates in much the same way, except the names
are a bit different when coming from the unicode_data source
and so require somewhat different tweaks.
The emoji alias data/code resides in noto-emoji, but the client for
this tool is in nototools, so it's a bit unclear where to put this.
To avoid circular dependencies, formerly we duplicated some flag
aliasing information in the nototools version. Now we're trying
the opposite approach, putting the tool in noto-emoji instead...
This is a simple recolor, starting from one of the non-generic sign of
the horns SVGs.
For programs that need both the base and the skin-tone modifier glyph,
this enables both the base (generic) sign of the horns emoji,
and also enables all the emoji versions with specific skin tones.
Apply patch from upstream 9c4f5f11802c 'Adjust shadow to equally
darken and lighten'. The waved flags were noticeably darker than
the source image, for example the blue of the Russian flag was too
dark.
Formerly when we were missing an image in the standard emoji sequence
we always labeled it as 'missing'. However, android excludes some
region flags, so we expect those to be missing and labeling them
implies an error. Add a new category 'exclude' and populate it
using the unknown-flag alias keys.
Standard Unicode (emoji v5) does not define skin tones for wrestlers,
but android does. Alias the skin tone variants of the non-gender-
specific emoji to the corresponding male emoji, as we do for the
non-skin-tone version.
When images are not processed due to not being able to meet the
minimum quality setting, error 99 is returned, so catch this too
so we still copy the file.
Might still want to tweak these settings.
When imagemagick 6.7.7-10 is processing the '-extent' operator and
discovers an image is grayscale, it turns the 32-bit truecolor sRGB
image into a grayscale image, but does so incorrectly-- the gray
levels and alpha are wrong. Get around this by using composition
to copy the source image over a slightly larger transparent image.
Thumbnail generation for Unicode requires some changes:
- 72x72 images (exact, not just fit within that frame)
- custom prefix ending in underscore
- images for unsupported flags
The default build doesn't support some flags by default, since they
are not wanted by Android. For the thumbnail list these images need
to be provided, so we alias them to the unknown flag images as that's
what would show for them. It's probably a good idea to list these
explicitly anyway, other tools could use this information.
To generate the Unicode comparison page of various vendor emoji,
Unicode prefers to use 72x72 images for all the supported emoji
without aliasing. This tool will generate these from the
directory of cleaned images produced by the emoji build, using
the aliases defined in emoji_aliases.txt.
Previously we haven't put the binary into the repo itself, since it's
built using the tooling. But people who fetch fonts from the get/noto
website want to know more about the version history of the fonts they
find there. Checking the binary into the noto-emoji site will facilitate
this.
This was built locally from the public images using the standard makefile
and zopflipng.
When relying on aliasing, a number of single character emoji can be
replaced by sequence emoji (in particular, gendered variants). If
these images aren't present, the current code that displays a sequence
'visually' fails to find an image for one of the parts, so bails and
there's no visual presentation for those sequences.
To fix this, we first canonicalize the part we're looking for, and try
to find an image for that, and if we fail we check for an alias and
try to find an image for that.
Forgot to canonicalize the aliases, so most of them wouldn't get used
because the keys against which they're compared are canonical. Fixed
that.
Also report unused aliases.
- Support --ignore_missing flag to skip missing data on output.
When all_images is set, this skips sequences for which we have
no image files. When all_images is not set, this skips sequences
for which we have image files but are not in the canonical
sequence list (e.g. older sequences for which we included skin
tone variants but which later versions of unicode decided there
shouldn't be).
- Use alias information to add alias sequences when not using
all_images and we have an image for the target sequence.
- Use alias information to mark missing images with '-alias-' when
we expect an alias (note, not only when we actually have one)
- Embed tool name, date, and arguments in a comment in the generated
html.
We currently name the mixed-gender 'kiss' and 'couple with heart'
images after the single-codepoint sequences. But aliasing maps
the single codepoint sequence to the gendered sequence, not the
reverse. As a result the build doesn't create ligatures for the
gendered sequences, since it thinks the image doesn't exist.
Fix this to use the gendered-sequence-names for these images, and
let aliasing work as intended. This follows the convention we've
adopted of letting the name more completely describe the image
contents, and defining how to represent less-specific sequences
using aliasing rather than baking these decisions into each image
name.
We've been inconsistent about use of the variation selector in image names,
and it's cleaner if we just consistently drop it. We use the unicode data
for the full unicode strings for these names now so we don't need it in
the image data.