--- fontconfig-2.2.98/src/fcdir.c.orig 2004-12-06 20:25:19.000000000 +0100 +++ fontconfig-2.2.98/src/fcdir.c 2005-01-22 21:26:06.141980024 +0100 @@ -166,6 +166,40 @@ return FcFileScanConfig (set, dirs, cache, blanks, file, force, 0); } +static FcBool +FcBlackListed (const char *name) +{ + static const char * const black_listed_names[] = { + "hrger.pfa", + "hrgrr.pfa", + "hritr.pfa", + "hrpld.pfa", + "hrpldi.pfa", + "hrplt.pfa", + "hrplti.pfa", + "hrscc.pfa", + "hrscs.pfa", + "u003043t.gsf", + "u004006t.gsf" + }; + + int low = 0; + int high = sizeof(black_listed_names) / sizeof(black_listed_names[0]) - 1; + + while (low <= high) { + int mid = (low + high) / 2; + int res = strcmp (name, black_listed_names[mid]); + if (res == 0) + return FcTrue; + else if (res < 0) + high = mid - 1; + else + low = mid + 1; + } + + return FcFalse; +} + /* * Scan 'dir', adding font files to 'set' and * subdirectories to 'dirs' @@ -232,7 +266,8 @@ } while (ret && (e = readdir (d))) { - if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN) + if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN && + !FcBlackListed (e->d_name)) { strcpy ((char *) base, (char *) e->d_name); ret = FcFileScanConfig (set, dirs, cache, blanks, file, force, config);