SVG icon indicating copy to clipboard operation
SVG copied to clipboard

Need to redesign GetSystemDpi

Open chucker opened this issue 6 years ago • 1 comments

SvgDocument currently initializes with a PointsPerInch variable. This is apparently used as a scale factor, e.g. in Ascent().

However, modern systems have no notion of a system DPI — each monitor can have a different DPI (in Windows, this started to be supported with 8.1), and this is increasingly a common occurrence: you may have a laptop with an internal display at 240 ppi (with the Windows UI "scaled to 250%"), and an external display at 96 ppi, for example.

It's not fully clear to me why these method calls exist at all, and if they are necessary, we either need a hardcoded fallback, a "default" DPI, or we need the DPI for the respective "current" screen (which is currently difficult to do in a cross-platform manner).

chucker avatar May 09 '19 18:05 chucker

You are right - this used to be hardcoded to 96, and the fix was a quick-fix basically for Windows 7 only (with no other OSes in mind...)

mrbean-bremen avatar May 09 '19 19:05 mrbean-bremen