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.
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.