I added a global setting that remembers the resolution of the screen on which VisualizationWindow gets created. Not sure I got the destructor right, but under 3.0.4 wxDisplay->getPPI does not exist, so I had to improvise.
This factor is then relied upon to size the text correctly on all dpi: on the screen, on paper, and on EPS (the font is different there, I guess my default distro GhostScript does not use FreeFonts, but it's pretty close).
In addition, there is a numWidth fudge for paper, adjusting the numWidth by the 96/dpi factor. Did not test it for an actual 1200dpi printer, as the PS() default seems to be 300dpi, no matter what the printer reports, but I tried to anticipate there possibly being 600dpi and 1200dpi printers out there.
This fixes both issues: the scaling of the fonts on high-dpi displays, and the placement of the y-axis label in the right location relative to the number tags. This works identically on both the Ubuntu desktop (72dpi, X, wx 3.0.5) and on Chromebook (192dpi, Wayland, wx 3.0.4).
Unless you see issues with this, please merge into main.
I added a global setting that remembers the resolution of the screen on which VisualizationWindow gets created. Not sure I got the destructor right, but under 3.0.4 wxDisplay->getPPI does not exist, so I had to improvise.
This factor is then relied upon to size the text correctly on all dpi: on the screen, on paper, and on EPS (the font is different there, I guess my default distro GhostScript does not use FreeFonts, but it's pretty close).
In addition, there is a numWidth fudge for paper, adjusting the
numWidth
by the 96/dpi factor. Did not test it for an actual 1200dpi printer, as the PS() default seems to be 300dpi, no matter what the printer reports, but I tried to anticipate there possibly being 600dpi and 1200dpi printers out there.This fixes both issues: the scaling of the fonts on high-dpi displays, and the placement of the y-axis label in the right location relative to the number tags. This works identically on both the Ubuntu desktop (72dpi, X, wx 3.0.5) and on Chromebook (192dpi, Wayland, wx 3.0.4).
Unless you see issues with this, please merge into main.