question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Also generate ligatures for RTL emoji sequences

See original GitHub issue

In https://github.com/googlefonts/nanoemoji/blob/main/src/nanoemoji/features.py, we only build GSUB ligatures for left-to-right (LTR) emoji sequences.

NotoColorEmoji.ttf also contains right-to-left (RTL) variants for those sequences that contain ZWJ (0x200D), see noto-emoji’s add_glyphs.py::get_rtl_seq method for how to get the correct RTL sequence from the LTR one (it’s not just reflect, the “Fitzpatrick modifiers” need to be treated specially): https://github.com/googlefonts/noto-emoji/blob/9a5261d871451f9b5183c93483cbd68ed916b1e9/add_glyphs.py#L227-L251

We should do the same here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
behdadcommented, Dec 22, 2021

Earlier versions of HarfBuzz didn’t do anything special about emoji sequences. That meant that if these sequences appeared in out-of-context direction (eg. marked as Latin in right-to-left direction) then harfbuzz would flip them; that would make the GSUB rules not apply. Hence the reverse rules where added.

These days HB has special code to treat these sequences as atomic items, so when the buffer is being reversed they are reversed atomically. So that hack is not needed anymore.

0reactions
anthrotypecommented, Dec 22, 2021

Thanks Behdad. Then I think we can close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Emoji ZWJ Sequence Considered Harmful - Unicode
Experiences with implementing emoji ZWJ sequences sequences in modern software ... Logical ligatures of bidi-neutral characters are not ...
Read more >
Add right-to-left text – Figma Help Center
If you need different text alignment, create a new text layer. In FigJam, text will automatically right-align on new stickies if you're typing...
Read more >
Fonts - ArchWiki
Monospaced. Fonts supporting programming ligatures are identified below with a ⟶ sign. For more monospaced fonts, also see #Bitmap and # ...
Read more >
Emoji is not a Language | Lobsters
Ligatures can't and don't solve all the traditional emoticons, let alone emoji. Emoji are a part of written communication, no matter how much ......
Read more >
Breaking Our Latin-1 Assumptions - In Pursuit of Laziness
Both Arabic and Hebrew are RTL scripts; they read right-to-left. ... You can also mash together consonants to create consonant clusters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found