Ignore:
Timestamp:
Aug 7, 2006, 4:34:19 PM (15 years ago)
Author:
Eugene Romanenko
Message:

font substitution fixes, fixed missed 'Page' in NLS-file

File:
1 edited

Legend:

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

    r71 r94  
    424424#define DEFAULT_MONOSPACED_FONT     "courier"
    425425
     426static bool isSansserif( const char *family )
     427{
     428    return ( ( strstr( family, "swiss" ) != NULL ) ||
     429             ( strstr( family, "sans" ) != NULL ) ||
     430             ( strcmp( family, "arial" ) == 0 ) ||
     431             ( strcmp( family, "tahoma" ) == 0 ) ||
     432             ( strcmp( family, "verdana" ) == 0 ) );
     433}
     434
    426435static string buildFontKey( FcPattern *p, bool useDefaultFonts )
    427436{
     
    435444        else
    436445        {
    437             if ( ( strstr( p->family, "swiss" ) != NULL ) ||
    438                  ( strstr( p->family, "sans" ) != NULL ) )
    439             {
     446            if ( isSansserif( p->family ) ) {
    440447                key = DEFAULT_SANSSERIF_FONT;
    441448            }
     
    443450                key = DEFAULT_SERIF_FONT;
    444451            }
     452        }
     453    }
     454    else
     455    {
     456        // use 'Symbol Set' (SYMB.PFB) instead of 'Symbol'
     457        if ( strcmp( p->family, "symbol" ) == 0 ) {
     458            key = "symbol set";
    445459        }
    446460    }
     
    481495    }
    482496
    483     //printf( "MATCHED STYLE: %s, FILENAME: %s\n", key.c_str(), pat->filename );
     497//printf( "MATCHED STYLE: %s, FILENAME: %s\n", key.c_str(), pat->filename );
    484498
    485499    FcFontSet *fs = new FcFontSet;
     
    526540                    const char *fcLang, FcType tLang, const char *lang, void * )
    527541{
    528     //printf( "FAMILY: %s, SLANT: %d, WEIGHT: %d, WIDTH: %d, SPACING: %d, LANG: %s\n",
    529     //        family, slant, weight, width, spacing, lang );
     542//printf( "FAMILY: %s, SLANT: %d, WEIGHT: %d, WIDTH: %d, SPACING: %d, LANG: %s\n",
     543//            family, slant, weight, width, spacing, lang );
    530544
    531545    FcPattern *p = new FcPattern;
Note: See TracChangeset for help on using the changeset viewer.