Unify print result for all OS#992
Conversation
This commit unifies the print result for windows and macos. Until now calculation of the scale factor of the Graphics involved using the display DPI which lead to a bigger scale factor with macos and therefor a noticably difference in the result. For the calculation the fixed factor of 96 is arbitrary and chosen to change existing behavior only on one OS. The calculation for the scaled font height is simplified and adapted similarly.
|
To be honest, I have no clue how to test this without an actual Mac. So I have to rely on your expertise here. Perhaps @Phillipus can see something that might cause issues here? I'm a little bit concerned about the |
|
FYI, I recently asked if it is possible to access a mac machine via VNC: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/7009 This is a resource that could potentially be shared... |
Yes. I tested on Mac printing to PDF (not a physical printer) and the font sizes are different and clipped. Before:
After:
|
|
Given that this PR is causing issues on MacOS and given that I don't have a way to test this (even if there is an option to request remote access to a MacOS VM from the EF)... What problem is this PR trying to fix? If this is for for the sake of making everything look "clean", then I wonder if it's really worth changing something that isn't broken. Just like seen in #944 (and likely also in several other issues), having 96 DPI hard-coded always seems to be causing problems when run on a system that's using 72 DPI. |
|
Andreas created this PR because when working on the issues with Still, the PR was not driven by any concrete need of us (we currently only deploy our product for Windows anyway) but just intended to improve behavioral consistency for the community. Given that there are still issues with the proposed fix and that no consumers complained about the existing behavior so far, it's completely fine to not further invest into it and accept the behavior as is. |


This PR unifies the print result for windows and macos. Until now calculation of the scale factor of the Graphics involved using the display DPI which lead to a bigger scale factor with macos and therefor a noticably difference in the result. For the calculation the fixed factor of 96 is arbitrary and chosen to change existing behavior only on one OS.
The calculation for the scaled font height is simplified and adapted similarly.
We used the same diagram for this results. You will notice, Windows looks the same before and after - the figures in the Mac print result were way bigger.
MacOS - master.pdf
Windows - master.pdf
MacOS - new.pdf
Windows - new.pdf