GDI Scaling not working properly

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

GDI Scaling not working properly

Postby Christian » Mon Feb 18, 2019 7:23 am

Hello,

I'm using Windows 10 1709 and I have a FHD display on which I set scaling to 125%.

When using GDI scaling in my C# application using CefSharp 69.0.0, I get a weird rendering as can be seen in the following image. It's based on the CefSharp.MinimalExample.WinForms application.

cef.png
cef.png (82.71 KiB) Viewed 5225 times


I have enabled GDI scaling using the following lines in my app.manifest.

Code: Select all
<asmv3:application>
    <asmv3:windowsSettings>
        <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
        <gdiScaling xmlns="http://schemas.microsoft.com/SMI/2017/WindowsSettings">true</gdiScaling>
    </asmv3:windowsSettings>
</asmv3:application>


I'm also calling the following code.

Code: Select all
Cef.EnableHighDPISupport();
...
Cef.Initialize(settings, true, null);


When using a display scaling of 100% everything looks normal. Does anyone have an idea why this happens? Thank you!
Christian
Newbie
 
Posts: 4
Joined: Wed Jul 18, 2018 9:30 am

Re: GDI Scaling not working properly

Postby amaitland » Mon Feb 18, 2019 2:59 pm

GDI scaling maybe incompatible with Chromium.

How does the latest unmodified version of the Minimum Example behave on your machine?

https://github.com/cefsharp/CefSharp.MinimalExample

Also test with a newer version of Windows, might be something they fixed.

In future please ask your question on https://stackoverflow.com/questions/tagged/cefsharp as it's not directly related to CEF.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: GDI Scaling not working properly

Postby Christian » Tue Feb 19, 2019 8:57 am

Thank you for the fast reply.

We tested the WinForms project of the CefSharp.MinimalExample with the latest Chrome 72.0.3626.109 (64-Bit) on both Windows 1709 and the latest Windows 1809 and we get the same kind of rendering distortion when scaling the display to 125% and using GDI scaling.

For now we simple won't use GDI scaling and hope that a future update will enable us to use it in our application.
Thank you!
Christian
Newbie
 
Posts: 4
Joined: Wed Jul 18, 2018 9:30 am

Re: GDI Scaling not working properly

Postby amaitland » Wed Feb 20, 2019 1:37 am

You can force chromium to disable scaling.

See https://github.com/cefsharp/CefSharp/wi ... ayssupport
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 37 guests