#include "wx/defs.h"
#endif // WX_PRECOMP
+#if wxUSE_PRINTING_ARCHITECTURE
+
#if wxUSE_POSTSCRIPT
#include "wx/dcmemory.h"
wxChar *header_file = wxGetTempFileName("ps");
- m_pstream = new ofstream( wxConv_file.cWX2MB(header_file) );
+ m_pstream = new ofstream( wxConvCurrent->cWX2MB(header_file) );
*m_pstream << "%!PS-Adobe-2.0\n"; /* PostScript magic strings */
*m_pstream << "%%Title: " << m_title.mb_str() << "\n";
wxChar userID[256];
if ( wxGetEmailAddress(userID, sizeof(userID)) )
{
- *m_pstream << "%%For: " << MBSTRINGCAST wxConv_libc.cWX2MB(userID);
+ *m_pstream << "%%For: " << MBSTRINGCAST wxConvCurrent->cWX2MB(userID);
wxChar userName[245];
if (wxGetUserName(userName, sizeof(userName)))
- *m_pstream << " (" << MBSTRINGCAST wxConv_libc.cWX2MB(userName) << ")";
+ *m_pstream << " (" << MBSTRINGCAST wxConvCurrent->cWX2MB(userName) << ")";
*m_pstream << "\n";
}
else if ( wxGetUserName(userID, sizeof(userID)) )
{
- *m_pstream << "%%For: " << MBSTRINGCAST wxConv_libc.cWX2MB(userID) << "\n";
+ *m_pstream << "%%For: " << MBSTRINGCAST wxConvCurrent->cWX2MB(userID) << "\n";
}
// THE FOLLOWING HAS BEEN CONTRIBUTED BY Andy Fyfe <andy@hyperparallel.com>
/* get the directory of the AFM files */
char afmName[256];
afmName[0] = 0;
- wxString fmPath(m_printData.GetFontMetricPath());
- if (fmPath != "") strcpy( afmName, (const char*) fmPath );
+
+ if (!m_printData.GetFontMetricPath().IsEmpty())
+ {
+ strcpy( afmName, m_printData.GetFontMetricPath().mb_str() )
+ }
/* 2. open and process the file
/ a short explanation of the AFM format:
strcat(afmName,name);
strcat(afmName,".afm");
FILE *afmFile = fopen(afmName,"r");
- if ( afmFile==NULL )
+
+#ifdef __UNIX__
+ if (afmFile==NULL)
+ {
+ strcpy( afmName, "/usr/local/share/wx/gs_afm/" );
+ strcat(afmName,name);
+ strcat(afmName,".afm");
+ FILE *afmFile = fopen(afmName,"r");
+ }
+
+ if (afmFile==NULL)
+ {
+ strcpy( afmName, "/usr/share/wx/gs_afm/" );
+ strcat(afmName,name);
+ strcat(afmName,".afm");
+ FILE *afmFile = fopen(afmName,"r");
+ }
+#endif
+
+ if (afmFile==NULL)
{
wxLogDebug( "GetTextExtent: can't open AFM file '%s'\n", afmName );
wxLogDebug( " using approximate values\n");
#endif
// wxUSE_POSTSCRIPT
+
+#endif
+ // wxUSE_PRINTING_ARCHITECTURE
\ No newline at end of file