Enable subpixel positioning for text only on high scaling factors
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 17 Jul 2023 11:24:27 +0000 (12:24 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Sat, 29 Jul 2023 08:14:57 +0000 (11:14 +0300)
commitba89a22a4d1d41c5cae3fab4c0b11e781582fc37
treede969d1446673c1e138fff912b27c6cc9faa3197
parent83db8e41a692b25c3e26fba0e146eed3e36280aa
Enable subpixel positioning for text only on high scaling factors

With our current font rendering stack, subpixel positioning simply does
not look good on non-HiDPI displays compared to font hinting.

While we have a setting as a way to restore font hinting, it's fairly
clunky to use with sandboxed applications, since it requires injecting a
settings.ini file in every application's configuration directory, or
adding the user's own configuration directory into the sandbox.

As a workaround, we can check the scaling factor used by GTK, and only
enable subpixel positioning if the factor is greater than one.
gtk/gtkwidget.c