Once again we need to create aliases, slightly differently. In this
case we want to generate new copies of files, not symlinks, and
generate the copies in a new location. So add these options.
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.
- 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.
This is a rewrite of add_glyphs in third_party/color_emoji. The
primary motivation was to move special aliasing rules out of that
code and use an external aliases file instead. This new version
is a bit more thorough about aliasing, and hopefully a little
easier to read.
The new add_glyphs takes its parameters using keywords, so
the invocation in the Makefile changed (as well as the path to
the tool).
emoji_aliases.txt was extended to add the flag aliases that were
formerly defined in the old add_glyphs code.
add_aliases was modified so the name of the alias file could be
passed in as a parameter to the main utility function that reads
the alias mapping from the file.
The new code expects all glyphs used by the template GSUB tables
to be named in the GlyphOrder table, but doesn't require the cmap
and hmtx table to be fleshed out. The new code fleshes these out
when it processes the sequences to add. As a result the cmap and
hmtx tables in the template were truncated.
The new code also sorts the GlyphOrder table when it extends/rebuilds
it.