http://qs1969.pair.com?node_id=11129560


in reply to Tk screen and monitor size in mm, DPI and scaling

(508 mm == 20") is exactly 1920 px @ 96 dpi. Tk doesn't bother(*) to use "real" dpi of your display. The "1.3(3)" is result of default Windows (Linux) 96 dpi, i.e. 96/72 == 1.3(3).

Scaling is both getter and setter, for those who strive to work in mm. It's simple math that links display diagonal, aspect ratio (i.e. WxH in pixels) and real resolution. For Linux, unlike other commands mentioned in this thread, the xrandr output matches the calculation of mm, and also ruler being applied :). For Windows, you have found PS command yourself (it's posted misspelled), result matches previous mm values for my double-boot config. I think the source for both platforms is parsing the EDID data, as e.g. Parse::EDID does.

---

(*) Interesting, the fact that Tk's scaling is only approximately "1.3(3)" for some configurations (mine, too), makes me suspect that Tk doesn't set this parameter blindly, but some calculations involving e.g. display width, rounded to centimetres, are happening during start-up. I can think of good reasons for Tk to stick to "96 dpi", but they are speculations only.