Rounding to pixel grid is not dpi aware #1132
Labels
architecture
changes the architecture, usually breaking
D-Medium
requires some research and thinking
discussion
needs feedback and ideas
#734 rounds sizes to integer number of px, but this is not the correct behavior when the dpi scaling factor is not 1.0.
Fixing this is not trivial. To know the dpi requires context, and this is a value that can change dynamically.
#1037 brings up much deeper architectural concerns. I chose px rather than device pixels as the units for layout because it's meaningful from a design perspective, and because it minimizes the chance of user layouts changing unintentionally with dpi, but it might be worth reconsidering this choice. There are a number of computations, of which this is one, and layout of windows in a virtual desktop (on Windows; mac is probably more geared to "points" than device pixels) is another, for which device pixels are probably a more natural unit of computation. Maybe we should consider using device pixels for layout, and do conversions as appropriate.
Or maybe we should keep px, but have mechanisms to round to device pixels using context.
The text was updated successfully, but these errors were encountered: