Remove hack to only load font modules if magic strings appear in font path
This commit is contained in:
parent
5f3f14179e
commit
bd147e6f4b
|
@ -481,12 +481,9 @@ static XF86ConfModulePtr
|
||||||
configureModuleSection (void)
|
configureModuleSection (void)
|
||||||
{
|
{
|
||||||
char **elist, **el;
|
char **elist, **el;
|
||||||
/* Find the list of extension modules. */
|
/* Find the list of extension & font modules. */
|
||||||
const char *esubdirs[] = {
|
const char *esubdirs[] = {
|
||||||
"extensions",
|
"extensions",
|
||||||
NULL
|
|
||||||
};
|
|
||||||
const char *fsubdirs[] = {
|
|
||||||
"fonts",
|
"fonts",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@ -505,28 +502,6 @@ configureModuleSection (void)
|
||||||
xfree(elist);
|
xfree(elist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process list of font backends separately to include only required ones */
|
|
||||||
elist = LoaderListDirs(fsubdirs, NULL);
|
|
||||||
if (elist) {
|
|
||||||
for (el = elist; *el; el++) {
|
|
||||||
XF86LoadPtr module;
|
|
||||||
|
|
||||||
module = xf86confcalloc(1, sizeof(XF86LoadRec));
|
|
||||||
module->load_name = *el;
|
|
||||||
|
|
||||||
/* Add only those font backends which are referenced by fontpath */
|
|
||||||
/* 'strstr(dFP,"/dir")' is meant as 'dFP =~ m(/dir\W)' */
|
|
||||||
if (defaultFontPath && (
|
|
||||||
(strcmp(*el, "freetype") == 0 &&
|
|
||||||
strstr(defaultFontPath, "/TTF")) ||
|
|
||||||
(strcmp(*el, "type1") == 0 &&
|
|
||||||
strstr(defaultFontPath, "/Type1"))))
|
|
||||||
ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem(
|
|
||||||
(glp)ptr->mod_load_lst, (glp)module);
|
|
||||||
}
|
|
||||||
xfree(elist);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue