ArcticaProject / arctica-greeter

Arctica Greeter: Greeter Frontend for LightDM
GNU General Public License v3.0
27 stars 10 forks source link

settings: Add font scaling via GDK_DPI_SCALE. This is not adjustable at runtime (for now). #85

Closed sunweaver closed 9 months ago

sunweaver commented 9 months ago

This depends on #84.

sunweaver commented 9 months ago

PR looks good, but there's one thing I'd like to mention before I merge this: there's another font scaling method: Xft.dpi and the related gtk-xft-dpi gsetting (which is actually 1024 * font_dpi for some reason).

GDK_DPI_SCALE probably overrides this and gtk-xft-dpi looks deprecated, but I'm not completely sure. We certainly have an xft-dpi setting already (defaulting to 96 [DPI]), which is unconditionally used to set the gtk-xft-dpi gsetting, so that's something to be mindful of.

Do you mean gsetting or xsetting? If xsetting, then this is probably superseded by GDK_DPI_SCALE. Also, GDK_DPI_SCALE is X11-agnostic and will probably work on Wayland, as well, if we ever have to move over to it.

Please go ahead. I have rebased the PR branch just now.

Ionic commented 9 months ago

There's an gtk-xft-dpi gsetting. It's somewhat coupled with the Xft.dpi xsetting, but not... fully... the situation looks complicated.

GDK_SCALE certainly doesn't work at all with Wayland, since Wayland has proper high-DPI scaling support and GDK_SCALE is more of a hack, so I also expect GDK_DPI_SCALE not to work with Wayland, but I haven't checked the source code.

I think that we don't have to care for Wayland at all, since Wayland has built-in support for this type of scaling.