Commit Graph

55 Commits (main)

Author SHA1 Message Date
Cosimo Lupo 33f930ba7f add symlinks for flags from emoji_aliases.txt
Run command:
python add_aliases.py -e svg -a emoji_aliases.txt -s third_party/region-flags/waved-svg
2022-01-24 15:43:26 +00:00
Cosimo Lupo e4df897e53 rebuild waved flags with border using latest rsheeter/warp
https://github.com/rsheeter/warp/pull/24
2022-01-19 12:50:52 +00:00
Cosimo Lupo 24ccbd2377 rebuild all waved flags with new aspect ratio and margins
https://github.com/rsheeter/warp/pull/21
2022-01-14 17:18:20 +00:00
Cosimo Lupo 84a33221ec rebuild all waved flags after picosvg PR258 and 259
https://github.com/googlefonts/picosvg/pull/258
https://github.com/googlefonts/picosvg/pull/259
2021-12-14 16:44:40 +00:00
Cosimo Lupo 013b3fe5ca Rebuild all waved SVG flags with latest picosvg and rsheeter/warp tool
Fixes https://github.com/googlefonts/color-fonts/issues/86 among others
2021-12-07 15:56:46 +00:00
Cosimo Lupo a2f11b307d update waved flags with new default --precision=1000
https://github.com/rsheeter/warp/pull/19
2021-05-13 16:56:25 +01:00
Cosimo Lupo d97331d2f7 update waved flags using latest warp script
degenerate curves are turned into lines, thus saving more then 20% file size
2021-05-13 16:00:33 +01:00
Cosimo Lupo fb7279dac0 re-warp and update all the waved flags using latest picosvg 0.15.1 2021-04-23 14:23:00 +01:00
Cosimo Lupo 56f460154d Merge remote-tracking branch 'origin/main' into svg_flags2 2021-04-23 14:22:25 +01:00
Cosimo Lupo 3c031c3dba update flag of South Georgia and South Sandwich Islands
The upstream copy on Wikipedia has been updated, so I'm updating it here as well.
The original SVG contained <text> element that referenced an external font (which is not web-safe and that doesn't exist on Wikimedia servers). The text was converted to paths to fix inconsistent renderings on different environments depending on the fallback font used.
2021-04-22 18:25:19 +01:00
rsheeter fec0ef8478 Reran flag_preflight to strip unexpected whitespace 2021-03-01 20:45:16 -08:00
rsheeter a2640c381a Extremely preliminary build of waved flags 2021-03-01 20:03:25 -08:00
Albert 5b38436393 Fix link 2020-08-27 23:34:20 +02:00
Rod S 1bc491419f On closer inspection we changed to use system pngquant and never closed
the PR to use a submodule. Don't merge when sleepy.
2020-08-20 15:31:01 -07:00
Julien Humbert acc6424551 Add pngquant submodule 2020-08-20 15:17:08 -07:00
Julien Humbert 71b4dab5b9 Remove intree pngquant 2020-08-20 15:17:08 -07:00
Cosimo Lupo 60161a370b
[emoji_builder|png] fix bytes vs str issues in py2.py3 2019-10-21 16:20:48 +01:00
Cosimo Lupo 7d501b5819
Merge remote-tracking branch 'origin/master' into python3-port 2019-10-21 15:42:11 +01:00
Qingqing Deng 03e444b8bf Fix FR and NL flags. 2019-08-13 20:06:00 -07:00
Seb 51b61919fb
Merge pull request #263 from qqd-google/flag_fix
Region flags change to improve consistency with all vendors.
2019-07-29 14:00:59 -07:00
Mike FABIAN a9ca546689 Make it work both with Python2 and Python3 2019-07-17 10:34:07 +02:00
Qingqing Deng 53205fbd81 Region flags change.
Add flags for
BL: Saint Barthélemy
BQ: Caribbean Netherlands
MQ: Martinique
RE: Réunion
TF: French Southern Territories

Change flag for
XK: Kosovo
2019-07-02 15:39:41 -07:00
Qingqing Deng 44f3e5b7f2 Region flags change.
Add flags for
BL: Saint Barthélemy
BQ: Caribbean Netherlands
MQ: Martinique
RE: Réunion
TF: French Southern Territories

Change flag for
XK: Kosovo
2019-07-02 12:32:10 -07:00
Doug Felt e571d53e02 Some tooling updates for android u11.
Note this does not change image files.

- modify emoji_builder so we can use a flag to control whether to use
  big or small glyph metrics.  android has legacy tooling that expects
  small metrics.  we leave the default in emoji_builder to use big metrics
  but in the makefile default the flag we pass to request small metrics.
  eventually this should shake out to big metrics.
- support more flags by default (not all yet).  Note we omit some in the
  Makefile that we use aliases for-- we don't need their images.
- add aliases for some new flags
- remove new flags from 'unknown flag aliases' list
- unalias some emoji we will have custom images for
- bump version number
- add annnotations file for u11 new and changed emoji
2018-05-09 20:13:57 -07:00
Doug Felt 9d977df32c Update region-flags from upstream.
This updates the svg, png, and html resources from behdad/region-flags.
It also updates the LICENSE (COPYING) and README.md files from there.

Formerly our copy contained only a few subregion flags, but this change
adds them all from upstream.

Also formerly we explicitly used symlinks in our data for flags that
are the same as other country flags.  Now however we just use the
upstream data.  Note that the emoji_aliases.txt file will still
cause the font to only have one copy of these.

Note this also deletes the copy of IC.png that somehow had found its
way into the region-flags directory.

Use big glyph metrics to support vertical text rendering
2018-01-02 12:35:41 -08:00
Yuki Takeichi a9d16062fb Use big glyph metrics to support vertical text rendering 2017-12-15 22:41:33 +09:00
Miguel Sousa 69952d1fd8 Fix tables version number to match published spec (#66) 2017-10-07 12:15:24 +02:00
cclauss 4607d55e4c Modernize Python 2 code to get ready for Python 3 2017-09-14 22:18:24 +02: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 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 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 11868c62b7 Fix location of new flag resources, and also update Makefile. 2017-01-24 14:27:29 -08:00
Doug Felt be1ec4f152 Update handling of fitzpatrick modifiers.
To handle forming emoji 'ligatures' in RTL contexts we generate
reversed ligature sequences for the GSUB table.  Formerly we only did
this when there was a ZWJ in the sequence, and full reversal worked
because we had no sequences with both fitzpatrick modifiers and ZWJ.
However, now we do.  Harfbuzz treats fitzpatrick modifiers as though
they were combining marks and so we need to as well so that GSUB data
is in the order Harfbuzz expects.  So we 'unreverse' these pairs.
2016-07-11 11:31:51 -07:00
Doug Felt 04bde33598 Update IC flag from upstream.
The .svg had already been updated, must have missed the .png.  The new
image is the civil flag.
2016-04-27 13:00:47 -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 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 6caa07aaae Minor tweaks to quiet makefile and fix bug in add_glyphs. 2016-01-28 14:03:21 -08:00
Doug Felt c67a8c3fa6 small fixes 2015-11-13 18:15:09 -08:00
Doug Felt 170bcdad0e comment out some print lines used for debugging 2015-11-13 17:34:15 -08:00
Doug Felt d9e320acb5 updates to support tr51 emoji sequences 2015-11-05 11:15:15 -08:00
Doug Felt 0f227e7834 wip - update emoji tooling to support tr51 sequences 2015-11-03 18:40:19 -08:00
Doug Felt 6bd9cc4a9b Remove format 14 cmap tool and ucd data, and update Makefile
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.
2015-10-14 16:56:44 -07:00
Doug Felt 5aad55c383 Add tool and data to generate format 14 cmap.
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.
2015-10-13 18:16:04 -07:00