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.
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.
- 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.
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.
- 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.