From 7388cdfeb683a81d589737f7d2008d09ef9c0f09 Mon Sep 17 00:00:00 2001 From: Rod S Date: Thu, 23 Dec 2021 16:19:54 -0800 Subject: [PATCH] Remove legacy check for reversed ZWJ emoji sequences. According to Behdad this issue was fixed in HarfBuzz 2.0.0, October 2018. Change-Id: I6e23ae7d637f79cb55b99a73ac8d16a0b0395610 Bug: 158944323 Test: drew a ZWJ in RTL and it worked fine (https://screenshot.googleplex.com/AHrRaKNR6S4Nwgb.png) Change-Id: I29e64f4577c819dfec0f3cbd878f0241bf706de0 --- tools/fonts/fontchain_linter.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tools/fonts/fontchain_linter.py b/tools/fonts/fontchain_linter.py index 99f77fee4698f..2c2c918251627 100755 --- a/tools/fonts/fontchain_linter.py +++ b/tools/fonts/fontchain_linter.py @@ -635,23 +635,11 @@ def compute_expected_emoji(): sequence = tuple(ch for ch in sequence if ch != EMOJI_VS) all_sequences.add(sequence) sequence_pieces.update(sequence) - if _emoji_sequences.get(sequence, None) == 'Emoji_Tag_Sequence': - # Add reverse of all emoji ZWJ sequences, which are added to the - # fonts as a workaround to get the sequences work in RTL text. - # TODO: test if these are actually needed by Minikin/HarfBuzz. - reversed_seq = reverse_emoji(sequence) - all_sequences.add(reversed_seq) - equivalent_emoji[reversed_seq] = sequence for sequence in adjusted_emoji_zwj_sequences.keys(): sequence = tuple(ch for ch in sequence if ch != EMOJI_VS) all_sequences.add(sequence) sequence_pieces.update(sequence) - # Add reverse of all emoji ZWJ sequences, which are added to the fonts - # as a workaround to get the sequences work in RTL text. - reversed_seq = reverse_emoji(sequence) - all_sequences.add(reversed_seq) - equivalent_emoji[reversed_seq] = sequence for first, second in SAME_FLAG_MAPPINGS: equivalent_emoji[first] = second