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.
A previous commit intended to remove the old PNGS and just leave the
new ones, but neglected to add the new ones resulting in the deletion
of all the PNGs. Um... oops.
Currently `verbosity` is an undefined name and line 201 will raise a `NameError` when executed. The only other place in this repo where `verbosity` is defined is as a function parameter to [do_generate_test_html()](5e1808fbbe/generate_test_html.py (L28)) with a default value of `verbosity=1`.
Someone who really understands the functioning of this code should __carefully review this change before merging it__. My sense is that this approach is better than raising a NameError but perhaps I am all wet.
In some places `build_svg_dir()` the variable is `flag_dir` (singular) and in others `flags_dir` (plural). Settled on plural everywhere to match the function parameter name.
The update to the new design accidentally left some old images. The new
design doesn't include resources for images we alias, and when the
directory was updated I forgot to remove the images corresponding to the
aliases.
This also deletes the svg images that are 'aliases' of existing images
according to our alias table, and the few flags (the flag data is not
sourced in the same way).
When building the font, images are composited onto a slightly
rectangular canvas that's 4 pixels wider on the left and right.
The thumbnails though are required to be 72x72, i.e. square.
In order that they look the intended size we need to crop off
the margins that were added earlier.
Same problem that we ran into previously with the emoji font--
imagemagick takes RGBA that contain only grayscale and converts
to grayscale with alpha, but although it can display these ok,
chrome can't. So force it to generate RGBA output.
This adds the 50-odd missing SVGs that were not added earlier.
Note that we are still missing the rainbow flag (we don't seem to
have a vector source) and most of the regional flags. The ~10
regional flags we do have do not match the png images, since they
were sourced differently. Currently we do not provide the flags
since we cannot rely on support for the svg operations necessary
to implement the 'wave' transform (nor do we have the code to
apply it...)
This also aligns naming between the svg and png. In particular, it
strips fe0f (emoji variation selector) from the names, and omits
1f48f (kiss) and 1f491 (couple with heart) as these alias. Those
images are now used for the respective heterosexual couples.
All the files were processed with the revised svg_cleaner tool, and
so are a bit smaller as a result. Other than some formatting
changes the main changes are removal of the xml doc header, removal
of the application comment, and removal of / changes to some
attributes of the svg tag.
Right now we do this by hand. This makes it possible to do this
automatically. It also adds information to the nametable version
string about the commit the font was built from.
The alias/unicode data is ahead of the current image data, which means
a lot of images appear to be 'missing' when generating names for the
current data set. Make it possible to set/ignore the limit on the
number of missing images before an exception is thrown.
Some of our environments use python from /usr/local/bin. In these
environments using /usr/bin/python can cause unexpected behavior
since the python module search path is different. So use env
to find python using the PATH instead.
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.