8000 Make the font atlas use a color image by valadaptive · Pull Request #7298 · emilk/egui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make the font atlas use a color image #7298

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

Merged
merged 1 commit into from
Jul 4, 2025

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
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
76AC
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
0