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

Fractional / HIDPI support (Windows) #49

Open
Miaourt opened this issue Aug 15, 2020 · 0 comments
Open

Fractional / HIDPI support (Windows) #49

Miaourt opened this issue Aug 15, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@Miaourt
Copy link

Miaourt commented Aug 15, 2020

Follow-up of webview/webview#54

In short, on Windows 10 (maybe 8 and 7, can't check), there is an option to use fractional resolutions for the interface (and all application), meaning that you can pick 100%, 125%, 150% 175%, 200% and so on.

The thing is, fractional pixels doesn't exists, where 100% and 200% are simple to implement since you just have to double the pixel's size (2x2 instead of 1x1), in-between values are more tricky.

Windows seems to rely on two different tricks to support those :

  1. Displaying properly "fractional" pixels using (unknown to me) wizardry .
  2. A fallback that render the software at a "normal" scaling (100%) and then upscale the output to the desired scaling (125%) resulting in blurry renders.

Tauri, per default, is using the 2nd trick, resulting in blurry applications :
Screenshot of the issue, with a top Windows which is Firefox displaying the application properly, and Tauri being blurred
Screenshot of the issue, with a top window which is Firefox displaying the application properly, and the bottom window a Tauri app being blurred

Steps to reproduce this behaviour:

  1. In the Windows 10's system settings, set the scaling to a fractional one.
  2. Start a Tauri project
  3. Build / Run dev
  4. See the blurriness

Thankfully, thanks to @Ciantic works, it seems to be pretty trivial to fix this issue, here is the solution provided by them : webview/webview#54 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant