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

Fix blurry rendering in some browsers #4299

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Conversation

emilk
Copy link
Owner

@emilk emilk commented Apr 1, 2024

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant to out-right revert #151 when I cannot reproduce its problem. Keeping it seems quite safe though.


Testing

Checkout the branch and run:

  • ./scripts/start_server.sh
  • ./scripts/build_demo_web.sh and then open http://localhost:8888/index.html#Rendering
  • ./scripts/build_demo_web.sh --wgpu and then open http://localhost:8888/index.html#Rendering

Check the "Rendering test" that the squares in the pixel alignment test are perfectly sharp, like this:

Screenshot 2024-04-01 at 13 27 20

If it looks something like this, something is WRONG:
Screenshot 2024-04-01 at 13 29 07

Please try it on different zoom levels in different browsers, and if possible on different monitors with different native dpi scaling. Report back the results!

Mac

I have tested on a high-DPI Mac:

  • Chromium (Brave): ✅ Can reproduce problem on master, and it's now fixed
  • Firefox: ✅ Can reproduce problem on master, and it's now fixed
  • Safari: ❌ Can't get it to work; giving up for now

@emilk emilk added web Related to running Egui on the web eframe Relates to epi and eframe labels Apr 1, 2024
@jleibs
Copy link
Contributor

jleibs commented Apr 1, 2024

Tested both firefox and chrome on arch linux under wayland across multiple zoom levels. All looks good.

@YgorSouza
Copy link
Contributor

Looks good to me as well.

Specs

OS: Fedora Linux 39 (Workstation Edition) x86_64 
Host: Laptop (12th Gen Intel Core) A6 
Kernel: 6.7.10-200.fc39.x86_64 
Resolution: 2256x1504 
DE: GNOME 45.5 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita-dark [GTK2/3] 
Icons: Adwaita [GTK2/3] 
CPU: 12th Gen Intel i7-1260P (16) @ 4.700GHz 
GPU: Intel Alder Lake-P GT2 [Iris Xe Graphics] 
Memory: 7123MiB / 64008MiB 

Firefox 124.0.1 (64-bit)

Interestingly, the master branch looks sharp only at 50% and 200% zoom, with the 200% display scale I use. If I set the display to 100% instead, it looks sharp only at 100% or 200% zoom. But this branch looks sharp on all zoom levels, with 100% or 200% display scale.

@crumblingstatue
Copy link
Contributor

I tested on Firefox+Linux+X11, the squares are sharp both with and without --wgpu

@emilk
Copy link
Owner Author

emilk commented Apr 1, 2024

Sounds like we're good then! 😃
Thanks for testing

@emilk emilk merged commit 0a40b16 into master Apr 1, 2024
35 checks passed
@emilk emilk deleted the emilk/fix-text-blur-web branch April 1, 2024 13:22
@emilk emilk self-assigned this Apr 1, 2024
@mash-graz
Copy link

mash-graz commented Apr 2, 2024

Sorry for the late replay.
But your fix looks fine! (linux, firefox, gnome wayland)

rendering

Thanks!

emilk added a commit that referenced this pull request Apr 2, 2024
* Closes #4241

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant
to out-right revert #151 when I cannot
reproduce its problem. Keeping it seems quite safe though.

---
# Testing
Checkout the branch and run:

* `./scripts/start_server.sh`
* `./scripts/build_demo_web.sh` and then open
`http://localhost:8888/index.html#Rendering`
* `./scripts/build_demo_web.sh --wgpu` and then open
`http://localhost:8888/index.html#Rendering`

Check the "Rendering test" that the squares in the pixel alignment test
are perfectly sharp, like this:

<img width="576" alt="Screenshot 2024-04-01 at 13 27 20"
src="https://github.com/emilk/egui/assets/1148717/fb6c4824-9e25-4304-bc0c-3c50fbd44a52">

If it looks something like this, something is WRONG:
<img width="488" alt="Screenshot 2024-04-01 at 13 29 07"
src="https://github.com/emilk/egui/assets/1148717/04bd93ff-2108-40c5-95f6-76e3bcb9cd7f">


Please try it on different zoom levels in different browsers, and if
possible on different monitors with different native dpi scaling. Report
back the results!


### Mac
I have tested on a high-DPI Mac:
* Chromium (Brave): ✅ Can reproduce problem on `master`, and it's now
fixed
* Firefox:  ✅ Can reproduce problem on `master`, and it's now fixed
* Safari: ❌ Can't get it to work; giving up for now
emilk added a commit that referenced this pull request Apr 2, 2024
* Closes #4241

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant
to out-right revert #151 when I cannot
reproduce its problem. Keeping it seems quite safe though.

---
# Testing
Checkout the branch and run:

* `./scripts/start_server.sh`
* `./scripts/build_demo_web.sh` and then open
`http://localhost:8888/index.html#Rendering`
* `./scripts/build_demo_web.sh --wgpu` and then open
`http://localhost:8888/index.html#Rendering`

Check the "Rendering test" that the squares in the pixel alignment test
are perfectly sharp, like this:

<img width="576" alt="Screenshot 2024-04-01 at 13 27 20"
src="https://github.com/emilk/egui/assets/1148717/fb6c4824-9e25-4304-bc0c-3c50fbd44a52">

If it looks something like this, something is WRONG:
<img width="488" alt="Screenshot 2024-04-01 at 13 29 07"
src="https://github.com/emilk/egui/assets/1148717/04bd93ff-2108-40c5-95f6-76e3bcb9cd7f">


Please try it on different zoom levels in different browsers, and if
possible on different monitors with different native dpi scaling. Report
back the results!


### Mac
I have tested on a high-DPI Mac:
* Chromium (Brave): ✅ Can reproduce problem on `master`, and it's now
fixed
* Firefox:  ✅ Can reproduce problem on `master`, and it's now fixed
* Safari: ❌ Can't get it to work; giving up for now
emilk added a commit that referenced this pull request Apr 2, 2024
* Closes #4241

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant
to out-right revert #151 when I cannot
reproduce its problem. Keeping it seems quite safe though.

---
# Testing
Checkout the branch and run:

* `./scripts/start_server.sh`
* `./scripts/build_demo_web.sh` and then open
`http://localhost:8888/index.html#Rendering`
* `./scripts/build_demo_web.sh --wgpu` and then open
`http://localhost:8888/index.html#Rendering`

Check the "Rendering test" that the squares in the pixel alignment test
are perfectly sharp, like this:

<img width="576" alt="Screenshot 2024-04-01 at 13 27 20"
src="https://github.com/emilk/egui/assets/1148717/fb6c4824-9e25-4304-bc0c-3c50fbd44a52">

If it looks something like this, something is WRONG:
<img width="488" alt="Screenshot 2024-04-01 at 13 29 07"
src="https://github.com/emilk/egui/assets/1148717/04bd93ff-2108-40c5-95f6-76e3bcb9cd7f">


Please try it on different zoom levels in different browsers, and if
possible on different monitors with different native dpi scaling. Report
back the results!


### Mac
I have tested on a high-DPI Mac:
* Chromium (Brave): ✅ Can reproduce problem on `master`, and it's now
fixed
* Firefox:  ✅ Can reproduce problem on `master`, and it's now fixed
* Safari: ❌ Can't get it to work; giving up for now
@emilk emilk mentioned this pull request Apr 2, 2024
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
* Closes emilk#4241

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant
to out-right revert emilk#151 when I cannot
reproduce its problem. Keeping it seems quite safe though.

---
# Testing
Checkout the branch and run:

* `./scripts/start_server.sh`
* `./scripts/build_demo_web.sh` and then open
`http://localhost:8888/index.html#Rendering`
* `./scripts/build_demo_web.sh --wgpu` and then open
`http://localhost:8888/index.html#Rendering`

Check the "Rendering test" that the squares in the pixel alignment test
are perfectly sharp, like this:

<img width="576" alt="Screenshot 2024-04-01 at 13 27 20"
src="https://github.com/emilk/egui/assets/1148717/fb6c4824-9e25-4304-bc0c-3c50fbd44a52">

If it looks something like this, something is WRONG:
<img width="488" alt="Screenshot 2024-04-01 at 13 29 07"
src="https://github.com/emilk/egui/assets/1148717/04bd93ff-2108-40c5-95f6-76e3bcb9cd7f">


Please try it on different zoom levels in different browsers, and if
possible on different monitors with different native dpi scaling. Report
back the results!


### Mac
I have tested on a high-DPI Mac:
* Chromium (Brave): ✅ Can reproduce problem on `master`, and it's now
fixed
* Firefox:  ✅ Can reproduce problem on `master`, and it's now fixed
* Safari: ❌ Can't get it to work; giving up for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe web Related to running Egui on the web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blurry font rendering in firefox on linux
5 participants