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

emscripten rendering should keep the aspect ratio #6918

Closed
ypujante opened this issue Oct 12, 2023 · 3 comments
Closed

emscripten rendering should keep the aspect ratio #6918

ypujante opened this issue Oct 12, 2023 · 3 comments
Labels

Comments

@ypujante
Copy link
Contributor

I built the example program example_emscripten_wgpu without any issue.

When I load it in my browser (Chrome), I noticed that as the window gets resized the ratio is not preserved, thus leading to a situation like this screenshot

Screenshot 2023-10-12 at 11 36 34

Obviously this is an extreme scenario, but the reason why I am reporting it is because the first time I opened it in my browser, my browser was not 1280x720 and as a result, the text/font looked really bad. So it seems that something was broken with the build or rendering. Also, it is not really easy to make the browser window exactly 1280x720 to have no artifacts due to stretching.

Note that I cannot copy/paste the build info because "Copy to clipboard" does not seem to work in this environment.

It is the latest commit on the docking branch 83c433682883aaa6f9583a4a84d1ae4bd8d1e977 built on macOS (13.5.2) with emscripten

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.45 (ef3e4e3b044de98e1811546e0bc605c65d3412f4)

This is the "about" window, with a more "normal" size, yet the font rendering does not look very good.

Screenshot 2023-10-12 at 11 47 56
@ocornut ocornut added the web label Oct 12, 2023
@ocornut
Copy link
Owner

ocornut commented Oct 12, 2023

I think this is covered by #6751

@ypujante
Copy link
Contributor Author

ypujante commented Oct 12, 2023

When I get a chance I will try to apply the changes included in this other issue and report back. Thanks

@ypujante
Copy link
Contributor Author

I confirm that the patch from #6751 fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants