pop-os / cosmic-text

Pure Rust multi-line text handling
https://pop-os.github.io/cosmic-text/cosmic_text/
Apache License 2.0
1.62k stars 107 forks source link

Inconsistent emoji rendering #327

Open richardhozak opened 6 hours ago

richardhozak commented 6 hours ago

Hello, while trying to update cosmic-text from version v0.7-ish (commit https://github.com/pop-os/cosmic-text/commit/e00109d77f06d5a2e3057865eda3f530bc40a046) to latest version v0.12.1 I've noticed there is a regression in rendering emojis.

The latest version renders only some emojis in color while rendering other in black/white version.

Here is a screenshot how it is rendered with 0.12.1 Screenshot from 2024-11-16 20-05-13

And here is a screenshot on how it was rendered with https://github.com/pop-os/cosmic-text/commit/e00109d77f06d5a2e3057865eda3f530bc40a046 and v0.6 image

Notice the different emojis. The text also looks different but not incorrect.

I've also tested this with v0.11, v0.10, v0.9 and v0.8 and they all look the same as v0.12.1. I've also tested with release v0.7, that also looks the same as v0.12.1. Then I tried downgrading to 0.6 and the emojis render correctly, so it must be some change between 0.6 and 0.7.

Is there anything I can test on my system to debug this issue or help you debug the issue?

richardhozak commented 6 hours ago

So I've checked all the commits between https://github.com/pop-os/cosmic-text/compare/0.6.0...0.7.0 and found the regression which is commit https://github.com/pop-os/cosmic-text/commit/66288ab2da9e5e9e74ede1ed081e581058ab4cca Noto Color Emoji should probably be higher in the fallback list. Will try to implement fix...