X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/793db75554d2d2bc5dc9b0fc42c0b7aa03a44183..5dc224630b21a1b95e0f59b611fbb81311d4709e:/src/generic/dcpsg.cpp diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index ed4bf8e189..9c0b4eaab1 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1011,6 +1011,10 @@ void wxPostScriptDC::SetFont( const wxFont& font ) } } + // We may legitimately call SetFont before BeginDoc + if (!m_pstream) + return; + PsPrint( name ); PsPrint( " reencodeISO def\n" ); PsPrint( name ); @@ -1178,6 +1182,9 @@ void wxPostScriptDC::SetBrush( const wxBrush& brush ) #include "wx/x11/private.h" #endif +#include +#include FT_FREETYPE_H + #include "wx/fontutil.h" #include #include @@ -1775,7 +1782,7 @@ bool wxPostScriptDC::StartDoc( const wxString& message ) { wxCHECK_MSG( m_ok, FALSE, wxT("invalid postscript dc") ); - if ( m_printData.GetPrintMode() == wxPRINT_MODE_FILE ) + if ( m_printData.GetPrintMode() != wxPRINT_MODE_STREAM ) { if (m_printData.GetFilename() == wxT("")) { @@ -1799,7 +1806,7 @@ bool wxPostScriptDC::StartDoc( const wxString& message ) PsPrint( "%!PS-Adobe-2.0\n" ); PsPrintf( wxT("%%%%Title: %s\n"), m_title.c_str() ); - PsPrint( "%%Creator: wxWindows PostScript renderer\n" ); + PsPrint( "%%Creator: wxWidgets PostScript renderer\n" ); PsPrintf( wxT("%%%%CreationDate: %s\n"), wxNow().c_str() ); if (m_printData.GetOrientation() == wxLANDSCAPE) PsPrint( "%%Orientation: Landscape\n" );