'pixel scale', an arbitrary scaling factor,
customized by the user, to please the eyes etc.
This in contrast to actual DPI naturally scaled rendering. 'true to scale'.
+++
Generic way to determine the OS's windowing system's so called 'pixel scale':
Windows:
1a) GetDpiForMonitor(ddmon, MDT_EFFECTIVE_DPI, int *dpi_x, int *dpi_y)
- NOTE: MDT_EFFECTIVE_DPI returns the custom user DPI setting
according to user pixel scale setting (See above).
This is not the true dpi, which NEWT already calculates
per monitor by its size and resolution!
(or attribute MDT_RAW_DPI here)
or, if 1a is n/a
1b) { dpi_x, dpi_y } = GetDeviceCaps(hdc, {LOGPIXELSX, LOGPIXELSX})
- NOTE: Same for all monitors
2) pixel_scale_x = (float)dpi_x / (float)96
pixel_scale_y = (float)dpi_x / (float)96
Unix:
0) See
https://wiki.archlinux.org/title/HiDPI 1) KDE Plasme: How to read the setup value?
- System Settings > Display and Monitor > Display Configuration > Global Scale
- range 100 - x00% in 25% steps, i.e. float
2) Qt5: QT_SCREEN_SCALE_FACTORS, QT_SCALE_FACTOR, ...
3) ...
9) GDK3+ GTK3/4: int GDK_SCALE, an environment variable
- NOTE: just an int type, not pleasing - from GDK3 world
Note: JDK-17 seems to use GDK_SCALE only ..
Note: We might end up using an AWT Compatibility mode
- and - a proper pixel scale mode (when and if available)
Note: Needs more investigation.
Debugging w/ AWT:
X) float J2D_UISCALE, an environment variable
- Windows: value is kept as float
- Unix: valye is cut-off to int (duh!)
.. to be continued ..