From 58097d9d4c1681ad29a3bbd77b21eb9c7e48466d Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Fri, 10 Feb 2017 10:23:02 -0800 Subject: [PATCH] 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. --- NotoColorEmoji.tmpl.ttx.tmpl | 4 ++++ third_party/color_emoji/add_glyphs.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NotoColorEmoji.tmpl.ttx.tmpl b/NotoColorEmoji.tmpl.ttx.tmpl index b4585df19..6811f5c34 100644 --- a/NotoColorEmoji.tmpl.ttx.tmpl +++ b/NotoColorEmoji.tmpl.ttx.tmpl @@ -443,6 +443,7 @@ + @@ -510,6 +511,9 @@ + + + diff --git a/third_party/color_emoji/add_glyphs.py b/third_party/color_emoji/add_glyphs.py index f5f29080c..aba1facf8 100644 --- a/third_party/color_emoji/add_glyphs.py +++ b/third_party/color_emoji/add_glyphs.py @@ -178,7 +178,7 @@ def add_lig_sequence(ligatures, seq, n): print 'lig sequence %s, replace %s with %s' % ( tseq, ligatures[tseq], n) ligatures[tseq] = n - if 'u200D' in seq: + if 'u200D' in seq or 'uE007F' in seq: rev_seq = seq[:] rev_seq.reverse() for i in xrange(1, len(rev_seq)):