Commit Graph

9 Commits (e022fd6573782431ac9a65b520376b57511c31cd)

Author SHA1 Message Date
Mike FABIAN 188ffcf08c Use Python3 explicitly 2019-07-17 10:35:02 +02:00
Doug Felt 512d629dcb Update add_aliases tool to generate canonical names.
Clients who want to identify sequences in text that have image files
would like to use the file names to identify these sequences, and
would like to identify canonical sequences using this method.
Add an option to the add_aliases tool to also create aliases using
the canonical names where they differ from the file names.

Our file naming omits the emoji presentation selector character, so
the image files by default do not include it.  This provides a means
to restore that.
2017-10-09 11:40:52 -07:00
Doug Felt 9e8ca395a1 Fix typo. 2017-09-15 11:25:19 -07:00
cclauss 4607d55e4c Modernize Python 2 code to get ready for Python 3 2017-09-14 22:18:24 +02:00
Doug Felt 029f65ee98 Update add_aliases to optionally create copies.
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.
2017-05-16 13:04:53 -07:00
Doug Felt 1e09374c16 Identify excluded images explicitly.
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.
2017-04-13 14:34:20 -07:00
Doug Felt 0d0db39af0 Update emoji html page generation.
- 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.
2017-03-07 14:28:21 -08:00
Doug Felt 616ed3a600 Rewrite add_glyphs, use alias table.
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.
2017-02-21 10:15:08 -08:00
Doug Felt 186affd135 Small tool to create aliases based on alias data. 2017-01-24 11:38:02 -08:00