Bug 250987

Summary: [GTK] Font scaling settings other than 1.00 are not rendered metrically equivalent to Firefox and Chrome, leading to broken page layouts
Product: WebKit Reporter: Jeff Fortin <nekohayo>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bugs-noreply, mcatanzaro
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=250138
Attachments:
Description Flags
Comparison at font scale 1.00 - all OK
none
Comparison at font scale 1.15
none
Comparison at font scale 1.30 none

Description Jeff Fortin 2023-01-22 13:55:35 PST
Created attachment 464597 [details]
Comparison at font scale 1.00 - all OK

If you take this page for example: https://www.lapresse.ca/international/europe/2023-01-22/guerre-en-ukraine-jour-333/l-allemagne-prete-a-autoriser-la-pologne-a-livrer-des-chars-leopard-a-kyiv.php

(there are various other websites affected out there, but this one is a bit more obvious, and it's easier to find other articles in that website that would trigger the issue)

...if you open the "gnome-tweaks" app, and set your font scaling to something other than the default 1.00, such as 1.15 or 1.30, you will observe that Firefox and Chrome retain the exact same font typesetting / layout rendering, while Epiphany / WebKitGTK does not.

Attached are some screenshots that compare the page mentioned above in all three browsers, with some focal points circled to draw your attention to the differences in rendering.
Comment 1 Jeff Fortin 2023-01-22 13:56:22 PST
Created attachment 464598 [details]
Comparison at font scale 1.15
Comment 2 Jeff Fortin 2023-01-22 13:56:53 PST
Created attachment 464599 [details]
Comparison at font scale 1.30
Comment 3 Jeff Fortin 2023-01-22 13:58:14 PST
This behavior was observed in the EpiphanyDevel "technology preview" flatpak package, but was also observed in version 43 and every previous WebKitGTK version (as far as I can remember).
Comment 4 Michael Catanzaro 2023-01-22 14:35:27 PST
Isn't this exactly the same as bug #250138, which I see you found?

It seems weird to apply the font scaling factor to everything rather than just fonts, but whatever, I guess if Firefox and Chrome both do that then we probably should too.
Comment 5 Michael Catanzaro 2023-01-22 14:35:36 PST

*** This bug has been marked as a duplicate of bug 250138 ***