Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7388cdfe authored by Rod S's avatar Rod S
Browse files

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
parent f1be3163
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -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