[Webkit-unassigned] [Bug 250138] [GTK] Changing system font-scaling factor results in messy rendering of the page (Epiphany, WebKitGtk)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 24 18:53:12 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=250138

--- Comment #21 from Glen Whitney <gwhitneycom5 at pobox.com> ---
(In reply to Ethan Reesor from comment #20)
> My use case is Wails, which currently has a hard dependency on gtk+-3.0 and
> webkit2gtk-4.0. There's an open ticket to upgrade to webkitgtk-6.0, but no
> movement on it.
> 
> What I consider to be "behaves reasonably" is more or less "Are there issues
> that significantly reduce the usability of my app?" In the example I used,
> there's a button containing the text "Greet". In Firefox and Falkon, the
> button and text are scaled the same amount so it looks right. That's the
> behavior I expect. In WebKit GTK (Epiphany, Wails), the text is scaled
> something like 2x more than the button so the rendering is totally screwy
> and the text is hard to read.

OK, so I am presuming everything that you're trying to do is in a GTK 3 context. There, the text-scaling-factor is operative, and the referenced PR does attempt to respect it. Will it affect the issues you are seeing? Without your trying to run the applications you are interested in with the dynamic webkitgtk libraries they use replaced with ones compiled from the PR, the best I can say is "probably". Is trying to run it that way at all in the cards for you? (Don't know your level of concern with this issue and/or your ease/comfort with compiling WebKitGTK from source and swapping in the resulting libraries.)

I say "probably" because in GTK3, there are lots of settings, and as I have found, a lot of different ways that people have their XWindows and GTK environments set up. I can only summarize by saying: "If the device pixel density that your GTK setup ends up detecting is roughly equal to the product of your Xft.dpi setting and your text-scaling factor, then your layout will look pretty good after the PR." If you are not sure about all of those things, you can try to get a handle on them by (in the browser/environment of concern) visiting https://katydecorah.com/css-ruler, and setting the body font size to 96px. Then look at the first green box on the right labeled "1em" and the purple box labeled "1in". If they look about the same size, then your layout after this PR will probably be pretty good.

If you have any other suggestions about how WebKitGTK should respond to GTK 3 settings, I am all ears. The one thing I don't think we can do is increase `physical` CSS dimensions based on the text-scaling factor. That would be making that text-scaling factor scale things other than text, which would seem to be against GTK semantics, and would also be making CSS 1in dimensions be other than one physical inch on screen, which would seem to be against HTML/CSS standards. Thanks again!

-- 
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/20240425/d9995d84/attachment.htm>


More information about the webkit-unassigned mailing list