Commit Graph

199 Commits (ed190c7060edf4351951f010b270e8da29df8840)

Author SHA1 Message Date
Doug Felt ed190c7060 Merge branch 'master' into emoji_html_title 2017-03-07 14:39:57 -08:00
dougfelt 07d4c025a4 Merge pull request #100 from dougfelt/fix_aliased_couples
Use full sequences to name images for mixed-gender couples.
2017-03-07 14:39:07 -08:00
dougfelt 77c99fd5f4 Merge pull request #99 from dougfelt/no_fe0f
Remove 'fe0f' from emoji asset names.
2017-03-07 14:38:50 -08:00
Doug Felt 0d0db39af0 Update emoji html page generation.
- Support --ignore_missing flag to skip missing data on output.
  When all_images is set, this skips sequences for which we have
  no image files.  When all_images is not set, this skips sequences
  for which we have image files but are not in the canonical
  sequence list (e.g. older sequences for which we included skin
  tone variants but which later versions of unicode decided there
  shouldn't be).
- Use alias information to add alias sequences when not using
  all_images and we have an image for the target sequence.
- Use alias information to mark missing images with '-alias-' when
  we expect an alias (note, not only when we actually have one)
- Embed tool name, date, and arguments in a comment in the generated
  html.
2017-03-07 14:28:21 -08:00
Doug Felt b9cbe2324c Use full sequences to name images for mixed-gender couples.
We currently name the mixed-gender 'kiss' and 'couple with heart'
images after the single-codepoint sequences.  But aliasing maps
the single codepoint sequence to the gendered sequence, not the
reverse.  As a result the build doesn't create ligatures for the
gendered sequences, since it thinks the image doesn't exist.

Fix this to use the gendered-sequence-names for these images, and
let aliasing work as intended.  This follows the convention we've
adopted of letting the name more completely describe the image
contents, and defining how to represent less-specific sequences
using aliasing rather than baking these decisions into each image
name.
2017-03-06 16:02:24 -08:00
Doug Felt 1165ab005c Remove 'fe0f' from emoji asset names.
We've been inconsistent about use of the variation selector in image names,
and it's cleaner if we just consistently drop it.  We use the unicode data
for the full unicode strings for these names now so we don't need it in
the image data.
2017-03-06 15:05:21 -08:00
dougfelt 700c7fb76f Merge pull request #98 from dougfelt/master
Get back in sync, init lookup table.
2017-03-02 11:03:32 -08:00
Doug Felt a42092aa5d Suppress echo of symlink generation in Makefile, again. 2017-03-02 11:01:33 -08:00
Doug Felt bb5c080aeb Make sure to initialize lookup table even if LookupType is set. 2017-03-02 10:53:48 -08:00
Doug Felt 20c0cd9af3 Merge remote-tracking branch 'upstream/master' 2017-02-23 11:18:47 -08:00
dougfelt ae7b319bbd Merge pull request #97 from dougfelt/vmtx
Add vhea/vmtx to NotoColorEmoji.
2017-02-23 11:18:18 -08:00
dougfelt 950666a5d7 Merge pull request #95 from dougfelt/emoji_sort
Emoji sort
2017-02-23 11:17:43 -08:00
Doug Felt 3a39580522 Add vhea/vmtx to NotoColorEmoji.
The vertical advance is a little over the horizontal lineheight.

Fixes noto-emoji#94.
2017-02-22 18:13:06 -08:00
Doug Felt df9b5647b7 Support 'ok', 'warning', 'error' annotations and define some.
Formerly the annotations file created a set of sequences that would
cause the name field to display with a special background color.  This
lets you choose one of three colors by defining the 'type' of annotation
in the file.  The file format was enhanced and the code using it takes
the type of annotation into account.

This also adds a sample annotation file with annotations for a number of
situations we currently expect to encounter: missing images that we expect
to be supported by aliases to other images, flags that we expect to not
support, and new unicode 10 emoji that we might not yet have image data
for.
2017-02-22 09:58:25 -08:00
Doug Felt d24aa6dd3e Add all_emoji and emoji_sort options to generate_emoji_html.
By default, the list of emoji sequences is based on the union of
the sequences encoded in the image file names for all the directories
(or the first directory if --limit was set).  The --all_emoji option
uses the emoji sequences from nototools/unicode_data instead.

By default, the list of emoji sequences is in unicode codepoint order.
The --emoji_sort option uses the emoji sequence sort order from
nototools/unicode_data instead.

Along with this, the ordered list of sequences becomes an argument to
write_html_page, which it should have been all along.
2017-02-21 16:17:23 -08:00
Doug Felt 1f2cde6c5e Map to canonical keys when we read in file name mappings.
It's a bit cleaner to canonicalize the keys when we read the file names.
This means we can just use the one canonical key, instead of using
the original to get the file and the canonical one to render text and
show the decoding.
2017-02-21 16:17:23 -08:00
Doug Felt f03c96c57a Merge remote-tracking branch 'upstream/master' 2017-02-21 16:10:23 -08:00
dougfelt 1c0ce222a4 Merge pull request #93 from dougfelt/subregion_flag_test_experiment
Rewrite add_glyphs, use alias table.
2017-02-21 16:09:53 -08:00
Doug Felt 616ed3a600 Rewrite add_glyphs, use alias table.
This is a rewrite of add_glyphs in third_party/color_emoji.  The
primary motivation was to move special aliasing rules out of that
code and use an external aliases file instead.  This new version
is a bit more thorough about aliasing, and hopefully a little
easier to read.

The new add_glyphs takes its parameters using keywords, so
the invocation in the Makefile changed (as well as the path to
the tool).

emoji_aliases.txt was extended to add the flag aliases that were
formerly defined in the old add_glyphs code.

add_aliases was modified so the name of the alias file could be
passed in as a parameter to the main utility function that reads
the alias mapping from the file.

The new code expects all glyphs used by the template GSUB tables
to be named in the GlyphOrder table, but doesn't require the cmap
and hmtx table to be fleshed out.  The new code fleshes these out
when it processes the sequences to add.  As a result the cmap and
hmtx tables in the template were truncated.

The new code also sorts the GlyphOrder table when it extends/rebuilds
it.
2017-02-21 10:15:08 -08:00
Doug Felt 6b1afeda6f Merge remote-tracking branch 'upstream/master' 2017-02-17 19:11:03 -08:00
dougfelt 1e613c4d2d Merge pull request #92 from dougfelt/subregion_flag_test_experiment
Subregion flag support
2017-02-17 17:44:30 -08:00
Doug Felt e5146fcecb Avoid duplicate names in glyphorder table.
When adding a single glyph that was not in the cmap, this was adding the
name for that glyph twice.
2017-02-16 15:07:47 -08:00
Doug Felt a62c0be851 Add GSUB substitutions to provide unknown flag for pairs of RIS.
A current issue in Harfbuzz requires that you not perform a delete
on index 1 before running a lookup on index 0.
2017-02-15 16:33:03 -08:00
Doug Felt 58097d9d4c Generate reversed GSUB sequences for subregion flags too.
Since subregion flag sequences consist of BN and ON they can be
impacted by bidi, and once again we have the problem that these are
processed in visual order so we need GSUB rules such that we can
handle them in either direction.  All subregion flag sequences
contain U+E007F, so we use that as a trigger for adding the
reversed sequence.

We also need to handle emitting the missing flag glyph for the
reversed sequences.

And we also want to strip out tag glyphs when the context is reversed.
This means the chaining context should include 'E007F' as well.
2017-02-15 16:21:55 -08:00
Doug Felt d270ecad99 Generate unknown flag for unrecognized subregion emoji sequences.
Instead of writing code to build the additional lookups needed for
subregion missing flag handling, this adds a GSUB table to the
template and lets add_glyphs do its normal thing to the first
GSUB lookup.
2017-02-15 16:21:55 -08:00
Doug Felt b5c7e8035c Use waving black flag for subregion flag sequences.
This was a recent change from the UTC.
2017-02-15 16:21:54 -08:00
Doug Felt 023e82014e Merge remote-tracking branch 'upstream/master' 2017-02-10 17:57:37 -08:00
dougfelt 6b1a50aa80 Merge pull request #91 from dougfelt/generate_emoji_html
Update generate_emoji_html tool.
2017-02-10 17:55:51 -08:00
Doug Felt f68991b34b Update generate_emoji_html.
Main changes are:
- Uses correct path to the font when a font is used. With standalone, also
  copies the font to under the destination directory.
- Canonical sequences are used in text rendered by a font.  Chrome handles
  these better (though still not perfectly).
- The description column now is renamed 'Sequence' and shows the
  (canonical) codepoint sequence for all emoji.  It also continues to show
  the component images for sequences.
- The name column now always shows the sequence name using the unicode
  data.  Single character emoji that are not default emoji presentation
  now have the names prefixed by '(emoji)'.  Names for the unknown flag
  PUA char and for the combining enclosing keycaps char (not technically
  an emoji but an emoji component) are special-cased, they are not in the
  emoji sequence name data built by unicode_data.
2017-02-09 18:24:48 -08:00
Doug Felt 930dfa805a Use waving black flag for subregion flag sequences.
This was a recent change from the UTC.
2017-02-09 18:24:31 -08:00
Doug Felt bb776b85f7 Use waving black flag for subregion flag sequences.
This was a recent change from the UTC.
2017-02-01 12:35:34 -08:00
dougfelt 2dc2c4b53f Merge pull request #89 from dougfelt/master
Replace missing include patch that was inadvertently dropped
2017-01-26 17:54:59 -08:00
Doug Felt 2a0df56cae Replace missing include patch that was dropped when merging with upstream.
Our copy of waveflag.c uses basename and so needs the header.
2017-01-26 17:52:06 -08:00
dougfelt 1217d9c211 Merge pull request #87 from dougfelt/subregion_flags
Subregion flags
2017-01-26 15:25:57 -08:00
dougfelt 312ceac1f7 Merge pull request #88 from dougfelt/waveflag_update
Update waveflag.c from upstream.
2017-01-26 14:37:48 -08:00
Doug Felt 46562661a4 Update waveflag.c from upstream.
Also, we call this a bit differently than upstream so have a slight change.
Add comment to highlight this more.

the
2017-01-26 14:22:56 -08:00
Doug Felt 042a05f19a Merge branch 'master' into subregion_flags 2017-01-25 17:01:41 -08:00
dougfelt e17f85ef19 Merge pull request #86 from dougfelt/emoji_checK
Emoji check enhancements
2017-01-25 17:01:00 -08:00
Doug Felt 57ec57dfd6 Support subregion flags when building the emoji font.
- update Makefile to include approved GB subregion flags by default
- update flag_glyph_name to generate sequence names for these
- fix bug where the glyphorder table wasn't getting updated with
  components, which was causing ttx to fail when compiling the
  ttx to ttf in a later phase.
2017-01-25 16:57:37 -08:00
Doug Felt 763a0f5155 Add subregion flag resources from upstream. 2017-01-25 09:39:33 -08:00
Doug Felt 494fb41a68 Copy original file if pngquant can't compress it.
--skip_if_larger does nothing and returns an error if pngquant would
generate a larger file than the original.  Formerly we would not copy
the file in this case so later operations expecting the file would fail.
No image triggered this, though, so the issue went unnoticed.  We want
the smaller of the two files.  It's unclear if later compression using
optipng would still do better with the larger quantized file vs the
original unquantized file, but we need to have a file.
2017-01-25 09:16:47 -08:00
Doug Felt 11868c62b7 Fix location of new flag resources, and also update Makefile. 2017-01-24 14:27:29 -08:00
Doug Felt 188e0c9601 Add flag resources from behdad/region-flags. 2017-01-24 14:12:32 -08:00
Doug Felt 326621dfd0 Add color option to generate_emoji_html tool.
Now optionally takes '-c' flag to set background colors for the last
emoji set.  Colors are 6-digit rgb hex values (for css after '#').
When more than one color is specified, the last emoji set is repeated
across columns, one for each color.  '-c' with no arguments defaults
to a set of 11 colors.  Omitting the flag uses the standard background
color.
2017-01-24 11:42:51 -08:00
Doug Felt b99cd4b22b Enhance check_emoji_sequences tool.
- includes aliases
- checks coverage of sequences (assumes full coverage of all unicode
  emoji and sequences for now)
- reports sequence names

(Some of this code needs to be shuffled into other places, sequence name
lookup and emoji_vs stripping doesn't belong here since these operations
are more generally useful.  That will come.)
2017-01-24 11:40:13 -08:00
Doug Felt 186affd135 Small tool to create aliases based on alias data. 2017-01-24 11:38:02 -08:00
Doug Felt d98eb857a2 Add skin tone aliases for golfer.
Also strip trailing whitespace.
2017-01-24 11:31:43 -08:00
Doug Felt 797ee66eba A tool for renaming files.
Emoji image files we get from upstream sometimes use the 'canonical'
sequences from the unicode data, which can contain emoji variation
selectors in the sequence.  For our image data we wish to ignore
variation selectors.  This tool renames files in a directory to the
corresponding sequence without emoji variation selectors, so that
other tooling doesn't need to account for them.
2017-01-23 14:04:48 -08:00
Doug Felt eeff0b59bb Add data file listing emoji aliases.
This maps a sequence of codepoints to another sequence, where the
first sequence should be an alias to the second.

Initial data contains emoji sequences where we expect an image named
according to the second sequence, but want to support the first
sequence with the same image.
2017-01-23 13:58:27 -08:00
Doug Felt 7212bff68a Merge branch 'master' into emoji_checK 2017-01-19 10:51:35 -08:00