From e955a14dd0bf7ed23a9e42f28a93e3357643300c Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 26 Jul 2020 07:41:57 +0200 Subject: 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'. --- wayland.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wayland.h') diff --git a/wayland.h b/wayland.h index dbf63c1b..88be3d71 100644 --- a/wayland.h +++ b/wayland.h @@ -236,6 +236,8 @@ struct monitor { } scaled; } ppi; + float dpi; + int scale; float refresh; enum wl_output_subpixel subpixel; -- cgit v1.3