#19209: WebView2 renders fuzzy pages on 4K screens when OS has scaling > 100%
(Windows)
-----------------------------------+-------------------------
Reporter: GerHobbelt | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 3.2.0
Component: WebView | Version: dev-latest
Keywords: webview2 edge 4K hdpi | Blocked By:
Blocking: | Patch: 0
-----------------------------------+-------------------------
Problem: the rendering of the HTML pages is fuzzy.
Observed when running the wxWidgets `webview` example, after having
installed the latest WebView2 prerelease to ensure we're at the bleeding
edge of Edge/WebView2.
This problem does *not* occur with the WebView2 sample applications
provided by Microsoft itself. (All this cf.
https://docs.microsoft.com/en-
us/microsoft-edge/webview2/get-started/win32 & related web pages there.)
Circumstances:
Windows 10/64bit, latest OS updates, latest Visual Studio 2019, fresh
build of the wxWidgets github source tree using the provided VC16
(MSVC2019) solution.
Seems this is a problem that more folks are / have been dealing with, e.g.
System Setup is nearly the same as described here:
https://community.ptc.com/t5/System-Administration/Creo-Parametric-4-0
-embedded-chromium-browser-display-issue-with/td-p/493194
, only I have 150% scaling.
[[Image(
https://community.ptc.com/t5/image/serverpage/image-
id/3473i3377B51CF026EBB7/image-size/large?v=v2&px=999)]]
[[Image(
https://community.ptc.com/t5/image/serverpage/image-
id/3474i2D370F01D78AD537/image-size/large?v=v2&px=999)]]
Relevant parts copy:
Windows Scale and Layout set to something larger than 100%
* common on higher resolution (> 1920 x 1200/1080) monitors to set this
larger than 100%
* 150% is common on a 4k monitor
With the above setup the embedded browser contains fuzzy content. Looks
the same as zooming greater than 100% on an image in an image viewer.
(I do NOT have the glitching effects reported for PTC Creo in that URL;
only the fuzzy page views, consistently. It's just that that page popped
up in a google search as the closest match and had a very good description
of the circumstances otherwise.)
Notes:
I've observed similar fuzzy=scaling issues when we trialed CEF in a C#
wrapper on Windows earlier this year (that was *without* using wxWindows
of course: C#/WPF), but have not pursued that then as there were other
problems observed at the time which had us decide it was a much less
desirable venue for development (unless nothing better would be
available).
Apparently embedders need to blow some magic smoke up the
WebView2/Chromium chimney to make it go away and get a crisp render on
HDPI screens. Haven't found yet what the magic incantation is, though.
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/19209>