Page 1 of 1

Windows font size, any workaround yet ?

Posted: Thu Dec 12, 2024 10:31 am
by thefunkyjoint
There is this issue , that when the user scales the font size > 100%, pages will show weird on CEF4Delphi.

I'm already using GlobalCEFApp.ForcedDeviceScaleFactor := 1, but it seems to make no difference.

This is a critical problem, because with the screen resolution nowadays being to high, usually all users set the font size greater than 100%.

I know this is probably a CEF issue... but is there any workaround ?

Re: Windows font size, any workaround yet ?

Posted: Thu Dec 12, 2024 10:34 am
by thefunkyjoint
I just found out that, if i resize the app window and maximize it again, the page shows correctly ! :D

What can i do to this happen without needing to resize the window manually ?

Re: Windows font size, any workaround yet ?

Posted: Thu Dec 12, 2024 3:17 pm
by salvadordf
Call CEFWindowParent1.UpdateSize;
https://github.com/salvadordf/CEF4Delphi/blob/0c66acbb85050bf9796b3551d8d6dc67439c731c/demos/Delphi_VCL/MiniBrowser/uMiniBrowser.pas#L1551

Re: Windows font size, any workaround yet ?

Posted: Thu Dec 12, 2024 5:17 pm
by thefunkyjoint
Fixed, thank you ! :D

Re: Windows font size, any workaround yet ?

Posted: Sat Jan 25, 2025 2:13 pm
by thefunkyjoint
Hello,

I'm having this issue again.

Currently i'm using 200% as Windows Text Scale, so i can use my screen on maximum resolution.

What happens is, when i first load a page, this is how it looks

https://ibb.co/7j1KD3b

Then if i minimize the app window and restore it, now the page shows correctly :

https://ibb.co/92pVkbq

Calling CEFWindowParent1.UpdateSize won't fix , the only workaround i know so far, is to mess with the app windows size.

Any suggestion that could fix this issue without having to manually changing app windows' size ? :roll:

Re: Windows font size, any workaround yet ?

Posted: Sat Jan 25, 2025 2:35 pm
by thefunkyjoint
I found a workaround :

CEFWindowParent1.Width := 100;
CEFWindowParent1.Width := screen.Width;

By doing this , i achieve the same desired result as changing the app window size manually :shock: