[Webkit-unassigned] [Bug 247980] WebKitGTK seems confused about size of 1px on 283 dpi display

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 10 01:53:27 PDT 2024


--- Comment #9 from Michael Pujos <youp1one1 at gmail.com> ---
First, I tested MiniBrowser with v2.42.5 and it has the same HiDpi scaling issues than v2.44.

With the current situation I get correct scaling for font and UI without rendering bugs (for example, the "latest news" panel on webkitgtk.org being truncated on the right) with the combination of: 

"Xft.dpi: 96" (no font scaling)
GDK_SCALE=2 GDK_DPI_SCALE=0.5  (2x GTK UI scaling)

Any other value for Xft.dpi (I use 240 normally) combined with whatever other values of GDK_SCALE and GDK_DPI_SCALE result in either fonts not being the proper size and/or broken rendering in web pages and UI (GTK widgets).

The GDK_ env variables are a GTK thing so scale it. Not sure if WebKitGTK ever make use of them in its code. It would be a good idea to grep the whole code to check if it does.

Anyway, if your patch fixes the Xft.dpi issue where setting a value other than 96 works fine (on my setup: "Xft.dpi: 240" GDK_SCALE=1 GDK_DPI_SCALE=1 (or both of these env variables being unset which is the same thing)), that's OK for me.

Though proper HiDpi handling is a complex thing and relevant WebKit devs should   give their opinion on the best way to handle it. Especially since many users may have GDK_SCALE and GDK_DPI_SCALE defined in their global environment for scaling GTK apps, as they are needed for proper scaling in other GTK programs (such as Firefox).

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240410/81ebeece/attachment-0001.htm>

More information about the webkit-unassigned mailing list