Silverfrost Forums

Welcome to our forums

DPI awareness changes between v7.20 & v8.05

4 Jan 2017 1:30 #18651

I note in the revision history under v8.00 that:

ClearWin+ now makes use of the 'DPI awareness' features first available with Windows 8.1. This means that, where possible, ClearWin+ will take advantage of the Windows API features designed to handle high DPI display settings which otherwise can lead to clipped text and blurry images.

Great - but.

I'm experimenting with an 8' tablet with 1280x800 screen. Under Windows 10, we no longer see 'Large fonts', but we do have a scaling factor, which on the tablet is 125% (preferred) and although 100% seems to be selectable, the setting doesn't seem to be persistent and resets itself when I run tablet things like the Start screen, so it's unavoidable.

If I run a FTN95/Clearwin+ executable with the salflibc.dll from v7.20, despite the setting, the fonts in a %gr area scale exactly as they do on my desktop and laptop, but if I use the salflibc.dll from v8.05 all the text grows (I'm guessing by 125%) and no longer fits.

At the risk of perhaps suggesting the answer myself, is this because I'm using SIZE_IN_POINTS@ rather than SIZE_IN_PIXELS@?

A similar effect is seen with things that rely on character cell size (e.g. %dy) - again I'm guessing at 125%, but there is no direct way to position things with %ap, %rp or %dy in pixels, and again, the answer seems to be to find out what the system font setting is and to work from that when using those three format codes. (Using, say: CALL get_system_font@)

Large fonts AKA High DPI setting (but not quite) are my particular hatred, and I thought I'd seen the last of them when I stopped using a particular old laptop where they were the default.

Eddie

PS under v7.20 salflibc.dll the fonts are neither clipped nor blurry!

4 Jan 2017 3:14 #18653

Have you considered calling SetDpiAwareness@(0)?

4 Jan 2017 3:40 #18655

Drat. Missed that. ENH file?

Please login to reply.