Skip to content

Conversation

@valadaptive
Copy link
Contributor

  • I have followed the instructions in the PR template

Splitting this out from the Parley work as requested. This removes FontImage and makes the font atlas use a ColorImage. It converts alpha to coverage at glyph-drawing time, not at delta-upload time.

This doesn't do much now, but will allow for color emoji rendering once we start using Parley.

I've changed things around so that we pass in text_alpha_to_coverage to the Fonts the same way we do with pixels_per_point and max_texture_side, reusing the existing code to check if the setting differs and recreating the font atlas if so. I'm not quite sure why this wasn't done in the first place.

I've left ImageData as an enum for now, in case we want to add support for more texture pixel formats in the future (which I personally think would be worthwhile). If you'd like, I can just remove that enum entirely.

@valadaptive valadaptive requested a review from Wumpf as a code owner July 3, 2025 14:58
@github-actions
Copy link

github-actions bot commented Jul 3, 2025

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

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

This is perfect; thank you!

@emilk emilk merged commit 7ac137b into emilk:main Jul 4, 2025
27 of 28 checks passed
@lucasmerlin lucasmerlin mentioned this pull request Jul 10, 2025
jonatino added a commit to VoltaSoftware/egui-miniquad that referenced this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants