wayland: calculate a single, scaled DPI value

Previously, we calculated the monitors horizontal and vertical PPI
values.

For font sizing, we used the vertical PPI value. It seems however,
that using the diagonal PPI value, i.e. diagonal_px / diagonal_inch,
gives more consistent results.

This is still a PPI value, but since it is intended to be used as a
FontConfig DPI value, name it 'dpi'.
This commit is contained in:
Daniel Eklöf 2020-07-26 07:41:57 +02:00
parent d675cf8720
commit 9601ed7cfb
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 13 additions and 2 deletions

View file

@ -236,6 +236,8 @@ struct monitor {
} scaled;
} ppi;
float dpi;
int scale;
float refresh;
enum wl_output_subpixel subpixel;