Another way to do this is to create a target, but when I tried that
it reintroduced the dependency analysis problem-- rules with this
dependency always triggered. Of course I might have missed something
subtle. Both the target approach and this approach come from
http://stackoverflow.com/questions/5618615/check-if-a-program-exists-from-a-makefile)
This always runs, but unless you're just running clean you'd always want to
perform this check, so I think that's ok.
This reverts some changes in commit b257b6647d that were causing build
issues. Those changes quoted the path to pngquant in order to deal
with spaces in the path, but as a side effect that prevented
build-dependency analysis (gnu 3.81 on ubuntu) from recognizing that
the .png files didn't need to be built, and so rebuilt them every
time, which takes several minutes. Apparently make doesn't like
quotes-- strings passed to the shell are fine, but things make itself
processes (like names of targets) are treated literally.
Since the path to pngquant is (now, anyway) a local subpath of the
current directory that has no spaces, it should be ok to use the
subpath and not bother to quote.
Another change replaces two dependencies on flag-symlinks with a
dependency on PNG128_FLAGS, for the same reason: after flag-symlinks
executed it was not recognized as being up to date and so the rules
with these dependencies always executed.
The tool and data was moved to nototools.
Makefile now needs to invoke the tool as a script, rather than passing
it to python, since the tool is no longer local. Running setup.py in
nototools will make the script accessible. Setup (apparently) copies
the script to /usr/local/bin and it is not automatically updated when
nototools changes, still need to figure out how to address this.
emoji-data and the code to process it might be useful, but it not
actually used by the tool at present.
The tool currently assumes that all emoji glyphs mapped by the default
cmap share the same presentation.
This script takes ~1 second for startup, so calling it repeatedly for
each flag slows the Makefile considerably, and unnecessarily since it
can be called for all the flags at once.
Now make clean takes about 1.2s, instead of 3m45s.
collect_emoji_svg takes the region-flags data in third_party
and copies/renames it into a target dir, then overlays this with
the data in noto/color_emoji/svg (which also has a few flags in
it).
generate_test_html changes the html to make room for the flag glyphs,
which are a lot wider. It also adds a flag so we can skip regenerating
the .ttx file in case we want to muck with it directly and regenerate
the .woff from that.
svg_builder has a number of changes needed to deal with the much
more varied svg in the region_flags data. See comments in the file
for some of the changes that needed to be made. Some of these
changes are provisional pending clarification of the spec, which
doesn't provide enough guidance.
svg_cleaner is changed slightly to strip width and height, this step
now happens after extract this information from svg in svg_builder,
instead of before.
third_party subdir is for forks/clones of external projects. The svg code
isn't a modification to that project, but an addition to the font-building
code in noto/color_emoji.
This also fixes a slight bug in the html generation, which set the default
large glyph image but forgot to set the hex version of the text below it.
This generates the font and the html test file in one go, so that we
can be assured of using the same set of glyphs in both. This also adds
the template file used to generate the SVG font.
Other tweaks:
- Adds additional parameters (include, exclude) to file selection. This
was useful when debugging. Other parameter tweaks as well.
- Changes format of html file to flow text, show information on hover.
This is better than the old table layout.
- Changes transform of SVG to put it at top of ascent, rather than top of
EM square. Text selection uses ascent+descent, and the SVG was higher
than the selection.
- Adds a little more status output controlled by the verbosity flag.
- Quiets the ttx output on reading/writing, also controlled by verbosity.