Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color Emoji support #2551

Open
mikedilger opened this issue Jan 6, 2023 · 2 comments
Open

Color Emoji support #2551

mikedilger opened this issue Jan 6, 2023 · 2 comments
Labels
feature New feature or request

Comments

@mikedilger
Copy link

mikedilger commented Jan 6, 2023

Lack of full color emoji support makes egui a poor fit for a chat program

I'm developing a nostr client in which, like chat or twitter, people use emojis often. I'm trying to decide whether to change GUIs or whether egui might step up to this challenge. Funding may be available.

This issue is tightly related to font rendering, which there are other open issues for. Depending on the solution to those issues, this issue may also resolve. But I'm listing it explicitly because it might not. Many font rendering libraries do not handle the several font tables needed for color emoji support.

Describe the solution you'd like

I'd like color emoji support.

I'd also like font hinting (the fonts look blurry to me, including in your screenshots so it's not an issue on my side), although it occurs to me that font hinting behaves differently depending on where the pixels line up and pre-rendering to a texture couldn't know where they will line up... but maybe I misunderstand. Nonetheless I didn't include it as I'm not sure it's possible in egui.

I personally don't care if non-rust libraries are involved, but I understand that egui wishes to avoid that.

cosmic-text uses swash IIRC for rasterization and rustybuzz for layout. Swash is probably the upstream solution for rasterization as far as I can tell (not all of cosmic-text is applicable). According to my tests, cosmic-text isn't alpha blending right (partial pixels of one character overwrite partial pixels of previous characters).

Describe alternatives you've considered

I tried seeing if I was bright enough to implement this myself but I got quite bogged down in parts I still don't understand.

I've considered switching to iced gui or imgui.

Additional context

If color emojis are listed first as a FontFamily, layout breaks pretty badly.

@jb55
Copy link

jb55 commented Feb 16, 2024

@mikedilger you make any progress on this? I am also interested for damus notedeck. maybe we can get a bounty going from the nostr fund.

@mikedilger
Copy link
Author

I haven't looked into this since, so more than a year. I'm still living with B/W emojis. Once I finish my relay, maybe I'll have time to dig into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants