pub fn device_scale() -> f64
Return the current device scale factor (default 1.0).
1.0
This is the ratio of physical pixels to logical pixels. For a 2× HiDPI display this is 2.0; for a standard display it is 1.0.
2.0