简体   繁体   中英

Font Scaling in Windows 8 vs Font Scaling in Windows 7 (under high DPI - 144)

Ok, I am aware of developing high dpi applications in WinForms and WPF, but while testing some features in Windows8, I stumbled upon something weird.

I have a WinForms application with AutoScalingMode set to DPI . The form has a bunch of labels. All the labels' font units are measured in points but one (the red label which reads "This text block is special. Its size is 18px"), as its size is set to 18px and not pt .

I ran the application in Windows 7 as well as Windows 8. Windows 7 does not auto scale this (the red one) label as expected but Windows 8 auto scales the same label !

What could be the issues? Is there a documented statement from Microsoft stating that Auto Scaling set to None won't work in Windows 8?

在此处输入图片说明在此处输入图片说明

Okay, I guess I found the reason. I will have to disable the DWM settings to "Disable display scaling on high DPi settings". If I do so, then it is not scaling the text in Windows 8.

But I did not have to do this in Windows 7 and still it works fine! Wondering why..!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM