/* 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");