egui/crates/epaint/src
valadaptive 7ac137bfc1
Make the font atlas use a color image (#7298)
* [x] 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.
2025-07-04 13:15:48 +02:00
..
shapes Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
text Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
util Remove things that have been deprecated for over a year (#7099) 2025-05-28 09:47:15 +02:00
brush.rs Add `epaint::Brush` for controlling `RectShape` texturing (#5565) 2025-01-02 15:34:28 +01:00
color.rs Added ability to define colors at UV coordinates along a path (#4353) 2024-04-22 18:35:09 +02:00
corner_radius.rs ⚠️ Rename `Rounding` to `CornerRadius` (#5673) 2025-02-04 12:53:18 +01:00
corner_radius_f32.rs ⚠️ Rename `Rounding` to `CornerRadius` (#5673) 2025-02-04 12:53:18 +01:00
image.rs Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
lib.rs Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
margin.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
margin_f32.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
mesh.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
mutex.rs Fix some clippy issues found by 1.84.0 (#5603) 2025-01-13 08:29:13 +01:00
shadow.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
shape_transform.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
stats.rs Optimize editing long text by caching each paragraph (#5411) 2025-04-01 18:55:39 +02:00
stroke.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
tessellator.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
texture_atlas.rs Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
texture_handle.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
textures.rs Make the font atlas use a color image (#7298) 2025-07-04 13:15:48 +02:00
viewport.rs Refactor: put each shape into its own file (#5564) 2025-01-02 14:55:49 +01:00