Bug 262037 - [GTK] Print should always use scale 1.0, not the screen scale
Summary: [GTK] Print should always use scale 1.0, not the screen scale
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 07:06 PDT by Milan Crha
Modified: 2024-10-03 11:06 PDT (History)
2 users (show)

See Also:


Attachments
Horrible looking printout when setting display scaling to 175% (253.42 KB, application/pdf)
2024-10-03 11:02 PDT, erezzonico
no flags Details
normal looking printout when setting display scaling to 100% (244.25 KB, application/pdf)
2024-10-03 11:06 PDT, erezzonico
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2023-09-25 07:06:07 PDT
Moving this from a downstream bug report:
https://gitlab.gnome.org/GNOME/evolution/-/issues/2525

When printing a page with system-set scaling other than 1.0 (I managed to reproduce at least under GNOME with gnome-tweaks->Fonts->Scaling factor set to 2.00, but I guess the screen scale for hiDPI might work similarly), then this scale factor should be ignored when sending the page to the printer, to save space and paper and toner and electricity.

This is with webkit2gtk4.1-2.42.0-1.fc38.x86_64

Steps:
a) verify the gnome-tweaks->Font->Scaling factor is 1.00
b) run from a terminal:
   /usr/libexec/webkit2gtk-4.1/MiniBrowser https://www.webkitgtk.org
c) once the page loads, use the menu button->Print
d) Choose "Print to File" and select the file, then confirm the print
e) quit the Minibrowser
f) set the gnome-tweaks->Font->Scaling factor to 2.00
g) repeat steps b), c), d), just save to a different file

I'd expect the files from d) and g) will be the same, but the g) file has larger font.
Comment 1 erezzonico 2024-10-03 11:02:31 PDT
Created attachment 472791 [details]
Horrible looking printout when setting display scaling to 175%
Comment 2 erezzonico 2024-10-03 11:03:30 PDT
I
Comment 3 erezzonico 2024-10-03 11:05:06 PDT
I want to confirm this behavior. Please fix. Printing on machines with HiDPI settings is almost impossible
Comment 4 erezzonico 2024-10-03 11:06:18 PDT
Created attachment 472792 [details]
normal looking printout when setting display scaling to 100%