Improve print preview and printing with high DPI

All print related scaling is based on 96DPI, so always let the printing contexts return this,
and also adjust the font to this DPI.
This commit is contained in:
Maarten Bent
2022-04-20 20:24:31 +02:00
parent 3da3103eb5
commit 1a1d19e93b
7 changed files with 38 additions and 11 deletions

View File

@@ -30,6 +30,7 @@
#include "wx/printdlg.h"
#include "wx/paper.h"
#include "wx/display.h"
#include "wx/osx/printdlg.h"
#include <stdlib.h>
@@ -746,10 +747,7 @@ bool wxMacPrintPreview::Print(bool interactive)
void wxMacPrintPreview::DetermineScaling()
{
int screenWidth , screenHeight ;
wxDisplaySize( &screenWidth , &screenHeight ) ;
wxSize ppiScreen = wxGetDisplayPPI();
wxSize ppiScreen = wxDisplay::GetStdPPI();
wxSize ppiPrinter( 72 , 72 ) ;
m_previewPrintout->SetPPIScreen( ppiScreen.x , ppiScreen.y ) ;