Hacker News new | ask | show | jobs
by vernervas 840 days ago
This is similar to how Win32/GDI layout guidelines (pre-win 10) worked.

Windows says reference font dpi is 72 and reference sizes for buttons, list, labels, etc is specified at 96 dpi, then you're supposed to use actual dpi/ref_dpi and scale things according to that.

Then you set DPI scaling per monitor v2 in manifest.xml and catch WM_DPICHANGED message and recompute scale factors and presto, perfect dpi scaling across any monitor at any fractional scale.

1 comments

Made me think of this for some reason:

https://building.enlyze.com/posts/targeting-25-years-of-wind...

Target from NT4 (up to Windows 11, I suppose) with LLVM and Visual Studio.