Ignore:
Timestamp:
Sep 3, 2006, 11:41:17 AM (15 years ago)
Author:
Eugene Romanenko
Message:

Fixed crash during fonts enumeration on font files which FreeType? doesn't understand (closes #83)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/fc-emulate-os2/fontconfig/fontconfig.cpp

    r95 r116  
    182182static void ftLoad( char *fn )
    183183{
     184    //printf( "Loading font %s\n", fn );
    184185    int l = strlen( fn );
    185186    if ( l < 5 ) {
     
    229230        FT_Face ftface;
    230231        if ( FT_New_Face( ftlib, fn, 0, &ftface ) ) {
     232            return;
     233        }
     234        //printf( "readed, family_name: %s   style_name: %s\n", ftface->family_name, ftface->style_name );
     235
     236        if ( ( ftface->family_name == NULL ) || ( ftface->style_name == NULL ) ) {
     237            printf( "Broken font file: %s\n", fn );
     238            FT_Done_Face( ftface );
    231239            return;
    232240        }
     
    260268
    261269    (*fcfmap)[ fn ] = fcfr;
     270    //printf( "Done loading font %s\n", fn );
    262271}
    263272
Note: See TracChangeset for help on using the changeset viewer.