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