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

Font rendering with gray Rgba color is ugly #1455

Closed
flosse opened this issue Apr 5, 2022 · 4 comments · Fixed by #2071
Closed

Font rendering with gray Rgba color is ugly #1455

flosse opened this issue Apr 5, 2022 · 4 comments · Fixed by #2071
Labels
bug Something is broken text Problems related to text visuals Renderings / graphics releated

Comments

@flosse
Copy link

flosse commented Apr 5, 2022

This is how it looks:

Bildschirmfoto_2022-04-05_04-48-30

And this is how it is created:

let label_color = Rgba::from_gray(if path.is_some() { 1.0 } else { 0.5 });
ui.label("directory:");
ui.colored_label(label_color, path.unwrap_or(&"- none selected -".to_string()));

It is rendered on a Linux system and the master branch (10f30a0).

@flosse flosse added the bug Something is broken label Apr 5, 2022
@emilk
Copy link
Owner

emilk commented Apr 5, 2022

Simpler reproduce:

ui.colored_label(egui::Rgba::from_gray(1.0), "white");
ui.colored_label(egui::Rgba::from_gray(0.5), "gray");

Probably related to #1412

@emilk emilk added text Problems related to text visuals Renderings / graphics releated labels Apr 5, 2022
@emilk emilk changed the title Font rendering with gray Rgba color is broken Font rendering with gray Rgba color is ugly Apr 5, 2022
@flosse
Copy link
Author

flosse commented Apr 5, 2022

To make it even simpler to reproduce, here is a repo:

https://github.com/flosse/egui-font-rendering-bug

@flosse
Copy link
Author

flosse commented Apr 5, 2022

Probably related to #1412

yes it is!
You can reproduce this by using a commit before 8272b08 as shown in the before-8272b08 branch.

@emilk
Copy link
Owner

emilk commented Apr 5, 2022

I added a test suite to the color test panel: 68d5806

White-on-white also looks bad:

Screen Shot 2022-04-05 at 14 39 00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken text Problems related to text visuals Renderings / graphics releated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants