Skip to content

Fix color emoji matching when emoji with non printing variation selector#617

Open
fundon wants to merge 1 commit intolinebender:mainfrom
fundon:fix_emoji_with_vs16
Open

Fix color emoji matching when emoji with non printing variation selector#617
fundon wants to merge 1 commit intolinebender:mainfrom
fundon:fix_emoji_with_vs16

Conversation

@fundon
Copy link
Copy Markdown
Contributor

@fundon fundon commented Apr 30, 2026

On macOS, after loading the system font, specifying a color emoji font for a range did not take effect.

Some special emoji will be followed by an invisible variation selector \u{fe0f}.
This causes the font query to not match correctly.

There are some emojis with non printing variation selector:

  • ✌️
  • ❤️
  • ☎️

@fundon fundon marked this pull request as draft April 30, 2026 01:44
@fundon fundon force-pushed the fix_emoji_with_vs16 branch from 7f5a8ae to 00e09c1 Compare April 30, 2026 01:47
@fundon fundon changed the title Fix color emoji matching issue when emoji with an invisible variation selector Fix color emoji matching when emoji with an invisible variation selector Apr 30, 2026
@fundon

This comment was marked as resolved.

@fundon fundon force-pushed the fix_emoji_with_vs16 branch 2 times, most recently from dddb4c7 to 876646f Compare April 30, 2026 22:09
@fundon fundon marked this pull request as ready for review May 1, 2026 01:41
Copy link
Copy Markdown
Contributor

@conor-93 conor-93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I agree these variation selectors shouldn't affect font queries. I've got one comment about how the change is articulated.

Comment thread parley/src/shape/mod.rs
@fundon fundon changed the title Fix color emoji matching when emoji with an invisible variation selector Fix color emoji matching when emoji with non printing variation selector May 1, 2026
@fundon fundon force-pushed the fix_emoji_with_vs16 branch from 90bc1f2 to f389309 Compare May 1, 2026 16:48
@fundon fundon requested a review from conor-93 May 1, 2026 16:54
@behdad
Copy link
Copy Markdown

behdad commented May 2, 2026

By the way, there's also this project that @drott and I put together:

https://github.com/google/emoji-segmenter

It's used in Chrome. The ragel code can produce Rust output as well, if that's of interest.

@fundon
Copy link
Copy Markdown
Contributor Author

fundon commented May 2, 2026

By the way, there's also this project that @drott and I put together:

https://github.com/google/emoji-segmenter

It's used in Chrome. The ragel code can produce Rust output as well, if that's of interest.

Interesting, thank you for sharing.

I'll try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants