c++fontswxwidgetswebview2highdpi

Is it needed to change font weight when using High DPI monitors for wxWebview in wxWidgets library?


I am working with wxWebview widget with both IE and Edge backend in Windows 10.

My understanding so far is that IE does not respect high DPI monitors and does not scale fonts respectively. So in IE backend, I must handle the DPI change event and update my font size with FromDPI().

I set the fonts in a style tag like below:

<style> body {font: normal 400 12px Segoe UI, system-ui;} </style>

But Edge does much better work and scales the font. My goal is to use Edge backend in production. I want to know whether it is even needed to handle DPI change event with this backend or it is handled internally by webview2 control? If yes, should I also change font-weight in high DPI monitors besides font-size? If yes, how? ( I think FromDPI does not work here )


Solution

  • I suggest dropping the IE backend.

    IE support will end in a couple of months, and then it will be Edge only.

    So as long as Edge behaves correctly - it will be OK.