]> git.pld-linux.org Git - packages/fontconfig.git/blame - fontconfig-blacklist.patch
- some pld.org.pl->pld-linux.org cosmetics
[packages/fontconfig.git] / fontconfig-blacklist.patch
CommitLineData
f8e2cc6b
AM
1--- fontconfig/src/fcdir.c.blacklist Mon Aug 26 15:57:40 2002
2+++ fontconfig/src/fcdir.c Fri Aug 30 14:59:05 2002
3@@ -150,6 +150,40 @@
4 return ret;
5 }
6
7+static FcBool
8+FcBlackListed (const char *name)
9+{
10+ static const char * const black_listed_names[] = {
11+ "hrger.pfa",
12+ "hrgrr.pfa",
13+ "hritr.pfa",
14+ "hrpld.pfa",
15+ "hrpldi.pfa",
16+ "hrplt.pfa",
17+ "hrplti.pfa",
18+ "hrscc.pfa",
19+ "hrscs.pfa",
20+ "u003043t.gsf",
21+ "u004006t.gsf"
22+ };
23+
24+ int low = 0;
25+ int high = sizeof(black_listed_names) / sizeof(black_listed_names[0]) - 1;
26+
27+ while (low <= high) {
28+ int mid = (low + high) / 2;
29+ int res = strcmp (name, black_listed_names[mid]);
30+ if (res == 0)
31+ return FcTrue;
32+ else if (res < 0)
33+ high = mid - 1;
34+ else
35+ low = mid + 1;
36+ }
37+
38+ return FcFalse;
39+}
40+
41 #define FC_MAX_FILE_LEN 4096
42
43 FcBool
44@@ -201,7 +235,8 @@
45 }
46 while (ret && (e = readdir (d)))
47 {
48- if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN)
49+ if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN &&
50+ !FcBlackListed (e->d_name))
51 {
52 strcpy ((char *) base, (char *) e->d_name);
53 ret = FcFileScan (set, dirs, cache, blanks, file, force);
This page took 0.094865 seconds and 4 git commands to generate.