Formerly, we wrote the file paths as given on the command line, the
assumption being that the output file was in the cwd and the paths
to the directories would be correct.
However if we want to generate the output file somewhere other than
the cwd the generated image paths don't work. This takes the location
of the output file into account and either generates relative paths
if the files are under the output file directory, or absolute paths
otherwise.
- Reformat lines to 80 columns.
- Use logging instead of verbose/quiet other options.
- A few miscellaneous small fixes/tweaks to parameters. Removed some
file-path-relative stuff that assumed old directory structure.
This uses some new fns in nototools.tool_utils, see nototools#220.
- Remove PUA character for 'unknown flag' from cmap.
Unfortunately, the contorted build process means we can't do this where
we do our other cmap munging-- font.getGlyphID dies in emoji_builder
if we remove it from the cmap in add_glyphs.py. So we remove it at
the end of emoji_builder.
- Forgot to remap one territory flag, missed it in the spreadsheet. Also
corrected a typo where I remapped the same flag twice. Sorted the flags
in key alpha order.
This adds some additional flags to the default set. In addition,
it contains code that creates ligatures for some flag sequences to
others, for a few cases where we want different regions to share
the same flag. Finally, it adds default ligatures so that pairs of
regional indicator characters for which there's no predefined glyph
get a 'missing flag' glyph. This avoids cases where sequences of
regional indicator sequences accidentally match at odd locations
because of a previous mismatch.
There is no actual 'missing flag' glyph yet. The code uses an
existing emoji as a placeholder.
This uses nototools to get unicode names. It relies on new
api in nototools.unicode_data to get data/names of proposed emoji
that are not currently approved and so not in the standard data
files.
Fixes remaining lint issues.
Additional fixes make this differ from the source drop provide by
Monotype, however this retains the same version number as they provided:
- renames the file and adjusts name table to conform to our existing naming
- moves the PUA characters that were in plane 0 to the PUA in plane 15 in
order to match NotoColorEmoji
changed
NotoEmoji-Regular.ttf
version: 1.04 vs 1.05
size: 442048 vs 418804 (23244 bytes smaller)
tables: changed glyf(-32692), post(+8057), cmap(+1420), loca(-56), hmtx(-28); added GPOS(36)
glyphs: 902 vs 888 (14 fewer glyphs)
chars: 901 vs 887 (14 fewer chars)
cmap removed: 2000..200B, E023, E030..E039, FFFC..FFFD
cmap added: FE82C, FE82E..FE837
Updates many existing emoji, and adds new emoji, including zwj
sequences for blended families. The updated emoji have not been
optimized or resized, run them through the makefile to get ones
similar to the previous existing ones. Not all updated emoji are new
renderings.
- fix ascent/descent in hhea and os/2 to match noto UI expectations,
zero linegap, clear useTypoMetrics bit, set weight to regular (400).
- add missing entries to name table, update revision
- map U+0000 to null glyph (not .notdef)
In addition, this tweaks the Makefile in some small ways:
- quiet zopflipng output somewhat (listen to your cpu fan to know
that something's happening) :-)
- make flag-symlinks target an order-only dependency (it was triggering
quantize+compress even when images hadn't changed)
- add comment about how to bypass make bug if multithread hangs
Change the build process to provide more intermediate steps and maintain
intermediate targets. This slows down make's analysis phase, though.
Make can be run with -j to parallelize the building, but be careful
with multiple targets on the command line (e.g. 'make clean font') since
clean's deletion of the output tree can sometimes occur after some of
the output directories get built.
This is preparatory to replacing the png images with the original internal
set. These require a bit more cleanup and processing, which is what these
changes do. The overall flow is:
- convert all emoji to desired size (136x128). All are smaller than this,
most are 128x128 but there are some others.
- run waveflag on the flags
- convert all flags to desired size(136x128). The flags are 128x128
originally.
- 'rename' the flags by creating softlinks with the desired names
- run pngquant on all the images and copy them into a single directory,
this reduces slight antialiasing differences.
- compress all the images, using zopflipng if available, else optipng.
zopflipng saves about 10%, but is 10x slower.
The remaining steps of building the font are unchanged, for the moment.
The intermediate image files are put into a 'build' subdirectory to organize
them and keep them out of the way.
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.