Skip to content

Color emojis 🦀#7333

Draft
lucasmerlin wants to merge 1 commit intomainfrom
lucas/color-emojis
Draft

Color emojis 🦀#7333
lucasmerlin wants to merge 1 commit intomainfrom
lucas/color-emojis

Conversation

@lucasmerlin
Copy link
Copy Markdown
Collaborator

@lucasmerlin lucasmerlin commented Jul 10, 2025

#7298 and a discussion on discord made me realize that adding custom color emoji support would be quite trivial now, so I made this prototype:

Screen.Recording.2025-07-10.at.20.37.36.mov

It currently only works with dark mode, we probably need some flag on the Glyph that it has color data and should not be affected with any tint.
Also this won't work for loading fonts with color emojis, for that we need #5784 or ab_glyph needs texture data support. It's more for loading custom emojis like on discord and slack (which would be perfectly fine for my usecase)

@lucasmerlin lucasmerlin marked this pull request as draft July 10, 2025 18:42
@github-actions
Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7333-lucascolor-emojis
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk
Copy link
Copy Markdown
Owner

emilk commented Aug 7, 2025

Neat! I think this is a cool feature to add, but in order to properly ship it we need to store a Map<char, ColorImage> somewhere (in Fonts?) so that we can repopulate the texture atlas when it is flushed.

We also need to figure out the tint problem.

@jb55
Copy link
Copy Markdown

jb55 commented Nov 14, 2025

exciting!

alltheseas added a commit to alltheseas/egui that referenced this pull request Jan 30, 2026
This adds support for rendering color emoji in egui via a new opt-in
`egui_noto_emoji` crate that bundles Noto Color Emoji sprites.

Key features:
- New `GlyphColoring` enum to distinguish color vs monochrome glyphs
- Color glyphs bypass text tinting and render with original colors
- Minimal API: `Context::register_color_glyph[_arc]` methods
- Atlas persistence: color glyphs survive font atlas rebuilds
- Deferred registration: glyphs registered before fonts init are queued

The implementation addresses feedback from PR emilk#7333 and emilk#7707:
- Fixes tinting problem (color glyphs not affected by text color)
- Handles atlas repopulation when fonts are recreated
- Aligns with skrifa+vello_cpu font backend (PR emilk#7694)
- Minimal API surface as suggested by @lucasmerlin

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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