diff options
Diffstat (limited to 'fondu.c')
-rw-r--r-- | fondu.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -175,7 +175,8 @@ static void ProcessNestedPS( char *fontname, char *origfilename, PSFONT *psfont } if ( psfont!=NULL && psfont->fontname==NULL ) { char *pt = strrchr(filename,'.'); - if ( pt!=NULL ) *pt = '\0'; + char *ept = strrchr(filename,'/'); + if ( pt!=NULL && pt>ept ) *pt = '\0'; fprintf( stderr, "Failed to find file %s when searching for a postscript resource\n", filename ); } free(filename); @@ -258,7 +259,7 @@ static void MakeAfmFiles(FOND *fond,FILE *f, int isfixed,char *origfilename) { fprintf( afm, "Comment Caveat: This does not contain all the information generally found in an AFM file\n" ); fprintf( afm, "Comment Generated by Fondu from a mac FOND resource\n" ); time(&now); - fprintf( afm, "Comment Creation Data: %s", ctime(&now) ); + fprintf( afm, "Comment Creation Date: %s", ctime(&now) ); fprintf( afm, "FontName %s\n", fontname ); fprintf( afm, "FamilyName %s\n", familyname ); fprintf( afm, "IsFixedPitch %s\n", isfixed?"true":"false"); @@ -494,7 +495,7 @@ static FOND *BuildFondList(FILE *f,long rlistpos,int subcnt,long rdata_pos, for ( k=j-1; k>=0; --k ) if ( stringoffsets[j]==stringoffsets[k] ) break; - if ( k!=-1 ) + if ( k!=-1 || stringoffsets[j]==0 ) continue; /* this style doesn't exist */ format = stringoffsets[j]-1; strlen = strings[0][0]; |