Commit Graph

309 Commits (a5046351fd03826f0a9ef83a6077c958434d7acf)

Author SHA1 Message Date
Doug Felt 8b2596d76a Generate file references relative to destination of output file.
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.
2016-04-15 15:00:32 -07:00
Doug Felt b3c61ff233 Add some simple tools to inspect data.
- materialize_emoji_images is a tool that adds symlinks to an existing set
  of images to add aliases with names that match some of those that get
  are built into the ligature table.  This is for the convenience of folks
  who want to review the images and see what sequences/codepoints we support.
  I've been asked to do this enough that I might as well just build a tool
  for it.
- flag_info picks out the flag images in a directory based on two kinds of
  naming styles the data use (ASCII or emoji_u+codepoint) and presents them
  in a list similar to that in the Makefile.  It helps when tracking down
  what flags we support and what we don't by making it easier to compare
  sets of flag images with different naming.  This is another quick one-off.
2016-04-14 17:46:19 -07:00
Doug Felt 59e04933c0 Tweak emoji html to display images against darker color. 2016-04-14 17:40:13 -07:00
dougfelt 7c92c3cfdd Merge pull request #50 from dougfelt/svg_updates
Update svg emoji tools.
2016-04-13 11:39:24 -07:00
Doug Felt b1588691cd Fix direction of comparision, use symbolic constant instead of raw value. 2016-04-13 11:38:03 -07:00
Doug Felt 44568b1c93 Remove overlooked option that is not needed with change to use logging. 2016-04-13 11:34:24 -07:00
Doug Felt 83978272f5 Update svg emoji tools.
- 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.
2016-04-12 17:07:27 -07:00
dougfelt e7a7241a92 Merge pull request #49 from dougfelt/tweaks
Tweaks to emoji build tools to deal with odds and ends.
2016-04-05 14:40:24 -07:00
Doug Felt ae1b8331ee Tweaks to emoji build tools to deal with odds and ends. 2016-04-05 13:28:40 -07:00
dougfelt 9aed6b2046 Merge pull request #48 from dougfelt/master
Fix some android emoji issues.
2016-04-05 12:55:15 -07:00
Doug Felt ae285e5838 Use delete_from_cmap from nototools in emoji_builder. 2016-04-04 13:59:59 -07:00
Doug Felt cc4c77ada3 Fix some Android emoji issues.
- 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.
2016-04-01 15:12:35 -07:00
Doug Felt 2ecfab517e Merge remote-tracking branch 'upstream/master' 2016-03-16 16:49:16 -07:00
dougfelt c6379827aa Merge pull request #46 from dougfelt/emoji_html_fix
Emoji html fix
2016-03-16 16:49:00 -07:00
Doug Felt 2a6be68841 fixes for review 2016-03-16 16:48:39 -07:00
Doug Felt ef61c743f5 Merge remote-tracking branch 'upstream/master' 2016-03-16 16:43:56 -07:00
dougfelt 8fba2e60fc Merge pull request #47 from dougfelt/check_emoji_sequences
Add tool to check/validate emoji sequences in image file naming.
2016-03-16 16:43:05 -07:00
Doug Felt d570ad7c9e Add tool to check/validate emoji sequences in image file naming. 2016-03-16 15:32:42 -07:00
Doug Felt 7239961d93 fix add/append mixup 2016-03-16 15:17:00 -07:00
Doug Felt 343e9ffbf4 Add 'unknown flag' glyph.
This uses PUA character U+FE82B for the unknown flag during processing.
Currently I don't yet remove this from the cmap when we're done.
2016-03-13 14:56:02 -07:00
Doug Felt 3a57df2ac6 Improve flag support.
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.
2016-03-11 19:02:15 -08:00
Doug Felt 0b5cf8651b Add IC svg and png resources from upstream (behdad/region_flags). 2016-03-11 15:16:54 -08:00
Doug Felt b1fad49732 Merge remote-tracking branch 'upstream/master' 2016-02-01 13:17:08 -08:00
Doug Felt a9b8e7f8e0 Add tool that generates an html file comparing emoji images.
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.
2016-01-29 14:38:07 -08:00
dougfelt 91ef95d0e7 Merge pull request #42 from dougfelt/master
Minor tweaks to quiet makefile and fix bug in add_glyphs.
2016-01-28 14:03:49 -08:00
Doug Felt 6caa07aaae Minor tweaks to quiet makefile and fix bug in add_glyphs. 2016-01-28 14:03:21 -08:00
dougfelt 7216ebf91a Merge pull request #41 from dougfelt/master
Revert NotoColorEmoji ascent/descent to previous values.
2016-01-28 14:02:41 -08:00
Doug Felt 9f6837da4b Revert NotoColorEmoji ascent/descent to previous values.
Note, this leaves the linegap at zero.  Bumps the version to 1.25.
2016-01-28 13:58:21 -08:00
dougfelt 941712890c Merge pull request #33 from dougfelt/master
Update NotoEmoji to v1.05 uh.
2015-12-15 14:05:20 -08:00
dougfelt 47fc5fa794 Merge pull request #32 from dougfelt/master
Fix googlei18n/noto-fonts#575
2015-12-15 14:03:23 -08:00
Doug Felt 2f1ffdd6fb Update NotoEmoji to v1.05 uh.
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
2015-12-15 13:49:44 -08:00
Doug Felt cd14dbcbc0 Fix googlei18n/noto-fonts#575 2015-12-10 13:25:15 -08:00
Sascha Brawer eeea374ac1 Merge pull request #31 from dougfelt/master
Update README.md with information on building NotoColorEmoji
2015-12-09 09:59:52 +01:00
Doug Felt 0a10ce4ddc Update README.md with information on building NotoColorEmoji. 2015-12-08 14:53:22 -08:00
dougfelt 979f9f6a1c Merge pull request #28 from dougfelt/master
Update and extend emoji data.
2015-12-07 13:30:14 -08:00
Doug Felt 914c9ecb9d Update and extend emoji data.
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.
2015-12-07 13:24:39 -08:00
dougfelt e31e9c41d3 Merge pull request #27 from dougfelt/master
Update NotoColorEmoji template so that it passes lint, bump version.
2015-12-01 09:43:46 -08:00
Doug Felt fc0ab7f36d Update NotoColorEmoji template so that it passes lint, bump version.
- 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
2015-11-30 17:49:52 -08:00
Behdad Esfahbod 0088b3e020 Merge pull request #24 from dougfelt/master
change builder tooling to support emoji sequences
2015-11-18 15:20:27 -08:00
Doug Felt c67a8c3fa6 small fixes 2015-11-13 18:15:09 -08:00
Doug Felt ed31eb2a9f fix emoji source path 2015-11-13 17:57:17 -08:00
Doug Felt 8f39884d6a remove temporary tool build_emoji_set 2015-11-13 17:51:16 -08:00
Doug Felt 34fbef4348 Rewrite makefile
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.
2015-11-13 17:35:50 -08:00
Doug Felt 170bcdad0e comment out some print lines used for debugging 2015-11-13 17:34:15 -08:00
Doug Felt 927b066b3a update template to version 1.23 2015-11-13 17:32:41 -08:00
Doug Felt d9e320acb5 updates to support tr51 emoji sequences 2015-11-05 11:15:15 -08:00
Doug Felt 7206289643 Merge remote-tracking branch 'upstream/master' 2015-11-04 09:51:48 -08:00
Doug Felt 0f227e7834 wip - update emoji tooling to support tr51 sequences 2015-11-03 18:40:19 -08:00
dougfelt a258889451 Merge pull request #22 from dougfelt/master
Change Makefile to be smarter about dependencies.
2015-10-15 10:52:49 -07:00
Doug Felt deff1a6545 Reintroduce check for missing binary, using a different method.
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.
2015-10-14 17:43:18 -07:00